Issue
I have a Python project and navigation/autocomplete work perfectly within files in the project. I want to specify a virtualenv so that navigation/autocomplete work with packages inside that virtualenv.
I tried this in settings.py, but navigation/autocomplete does not work. Also by setting "python.pythonPath":"~/dev/venvs/proj/bin/python
killed the original navigation/autocomplete.
{
"python.autoComplete.extraPaths": [
"~/dev/venvs/proj",
"~/dev/venvs/proj/lib"
]
}
Solution
With the latest update to the extension all you need to do is just specify the "python.pythonPath"
as follows.
The values for "python.autoComplete.extraPaths"
will be determined during runtime, but you are still free to specify custom paths in there.
Please, remember to restart Visual Studio Code once the necessary changes have been made.
{
"python.pythonPath": "~/dev/venvs/proj/bin/python"
}
Answered By - Don Answer Checked By - Mildred Charles (WPSolving Admin)