Feature request: autoupdate of python.autoComplete.extraPaths for virtualenv/pyenv
See original GitHub issueEnvironment data
VS Code version: 1.18.1 Python Extension version: 0.8.0 Python Version: 3.6.3 and 2.7.14 OS and version: windows10 with wsl, and linux Ubuntu 16.04LTS
In settings I add the following manually (this is win10 vsc with wsl under lxss):
"python.autoComplete.extraPaths": [
//"C:\\dist\\Python36\\Lib",
//"C:\\dist\\Python36\\Lib\\site-packages",
//"C:\\dist\\Python27\\Lib\\site-packages",
"C:\\Users\\morten.sensio\\AppData\\Local\\lxss\\home\\mortenb\\.pyenv\\versions\\3.6.3\\envs\\xmpp\\lib\\python3.6\\site-packages",
"C:\\Users\\morten.sensio\\AppData\\Local\\lxss\\home\\mortenb\\.pyenv\\versions\\3.6.3\\envs\\xmpp\\lib64\\python3.6\\site-packages",
//"C:\\Users\\morten.sensio\\AppData\\Local\\lxss\\home\\mortenb\\.pyenv\\versions\\3.6.3\\envs\\unity\\lib\\python3.6\\site-packages",
//"C:\\Users\\morten.sensio\\AppData\\Local\\lxss\\home\\mortenb\\.pyenv\\versions\\3.6.3\\envs\\unity\\lib64\\python3.6\\site-packages",
],
This is just 2 project, I have legacy 2.7.x projects also, so this file is becomming very large, and I like to uncomment those that are not active
Is there a way to do this automatic based on some scripts, enverionment variables etc. I uses pyenv/virtualenv everywhere. In production we just install and replace the shebang, it then knows where all packages resides, no need to configure anything
aka:
#!/home/restuser/.pyenv/versions/3.6.3/envs/flask/bin/python3
This finds all packages etc under this domain. very easy and very simple to maintain.
Is this possible to autosense this in any way so it becomes active after
I do a pyenv activate unity
(linux) or virtualenv ./unity; ./unity/scripts/activate.ps1
(win)
before I start vsc?
Thanks for an excellent free editor 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Is this still an issue? I’m understanding why the appropriate paths for your virtual environment when you have it set are not picking up the installed packages.
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.