How do I set Visual Studio to respect folders in PYTHONPATH?
I have a python Visual Studio project and I would like to use IntelliSense to help me when working with files from a folder that I added to User-Account PYTHONPATH
. In iPython, I can launch a tab for this folder without any problem. However, in VisualStudio, it keeps telling me that IntelliSense may be missing for the module I'm trying to include.
Are there any settings I have to set for Visual Studio to enable these folders added to PYTHONPATH
?
- Visual Studio 2017
- Anaconda 4.3.0
- Windows 10
source to share
The parameter Tools > Options > Python Tools > Ignore system-wide python path
has a parameter:
While this doesn't seem to affect me, I think it is an option that will do what we both want.
When using visual studio ipython terminal
import os
print(os.environ['PYTHONPATH'])
Raised a key error while with a normal ipython terminal outside VS, the path will be printed correctly.
source to share