PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

No intellisense when from 'PYTHONPATH'

Open linette-zyy opened this issue 2 years ago • 2 comments

Environment image

Steps to Reproduce 1.Create a module7.py under D:\test_pythonpath 2.Add the module7.py path to PYTHONPATH image 3.Launch VS and create a pythonapplication, make sure "Ignore system-wide PYTHONPATH variables" is unchecked image 4.Type sample code to get intellisense from 'PYTHONPATH'

import module7

Expected behavior I can get intellisense from 'PYTHONPATH'

Actual behavior No intellisense, although i add PYTHONPATH to search path image

image

linette-zyy avatar Jun 06 '22 08:06 linette-zyy

Probably related to #6831.

StellaHuang95 avatar Jun 06 '22 17:06 StellaHuang95

image In today's build, i can get intellisense from 'PYTHONPATH'. But when i checked the "Ignore system-wide PYTHONPATH variables", i still get the intellisense image

linette-zyy avatar Jun 08 '22 06:06 linette-zyy

@linette-zyy Does this still repro? For the latest repro, did you also add Pythonpath to Search path?

AdamYoblick avatar Feb 02 '23 22:02 AdamYoblick

@AdamYoblick In today's latest build:17.6.0 Preview 1.0 [33402.156.main],Python Package:17.0.23033.1 I can get intellisense from 'PYTHONPATH'. But when i checked the "Ignore system-wide PYTHONPATH variables", i still get the intellisense testpythonpath

linette-zyy avatar Feb 03 '23 04:02 linette-zyy

@AdamYoblick I believe the above behavior is expected, right? The Ignore system-wide PYTHONPATH variables only applies when PYTHONPATH is not added to Search Paths?

StellaHuang95 avatar Feb 24 '23 21:02 StellaHuang95

Yeah I think this is expected. Once a path is added to search paths, it doesn't matter how they were added there. In order to make them go away, you'd have to remove them from the search path.

AdamYoblick avatar Feb 24 '23 21:02 AdamYoblick

Closing the issue as the behavior is expected.

StellaHuang95 avatar Feb 24 '23 22:02 StellaHuang95