You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for activating env created using microvenv #21122
After following the steps in #21100 I tried running python in a new terminal inside of VS Code and got:\
codeuser@DESKTOP-HOME:~/test$ python -m pip install pytest
Command 'python' not found, did you mean:
command 'python3' from deb python3
command 'python' from deb python-is-python3
Not much in the logs department:
2023-04-25 12:23:40.485 [info] Experiment 'pythonPromptNewFormatterExt' is active
2023-04-25 12:23:40.485 [info] Experiment 'pythonPromptNewToolsExt' is active
2023-04-25 12:23:40.538 [info] Test server listening.
2023-04-25 12:23:40.547 [info] Python interpreter path: ./.venv/bin/python
2023-04-25 12:23:41.702 [info] Starting Pylance language server.
This was in WSL using WSLg so here's what the PATH looks like:
The environment after certation is selected. It is no different than a venv. This is microvenv, there are no activate scripts. All that is needed is that python points to .venv/bin/python
changed the title [-] new python path isn't being added to the PATH properly after creating the environment[/-][+]Add support for activating env created using microvenv[/+]on Apr 25, 2023
Kartik Raj (@karrtikr)microvenv does not use activation to work. All it needs is to be on PATH. When we detect a microvenv (i.e, no activation scripts, but has pyenv.cfg), then all that is needed is to add the bin path (i.e, .venv/bin) to PATH.
Activity
karthiknadig commentedon Apr 25, 2023
Kartik Raj (@karrtikr) Not sure why the PATH to the new venv is not being selected.
karrtikr commentedon Apr 25, 2023
Karthik Nadig (@karthiknadig),
karthiknadig commentedon Apr 25, 2023
The environment after certation is selected. It is no different than a venv. This is
microvenv, there are no activate scripts. All that is needed is thatpythonpoints to.venv/bin/pythonkarrtikr commentedon Apr 25, 2023
Well, currently activation requires activation scripts. If there're no scripts no env is activated.
[-] new python path isn't being added to the PATH properly after creating the environment[/-][+]Add support for activating env created using microvenv[/+]karthiknadig commentedon Apr 25, 2023
Kartik Raj (@karrtikr)
microvenvdoes not use activation to work. All it needs is to be on PATH. When we detect a microvenv (i.e, no activation scripts, but has pyenv.cfg), then all that is needed is to add thebinpath (i.e, .venv/bin) to PATH.Ensure microvenv is added to path after selection. (#21132)
Ensure microvenv is added to path after selection. (microsoft#21132)
Ensure microvenv is added to path after selection. (microsoft#21132)
Ensure microvenv is added to path after selection. (microsoft#21132)
Merged PR posit-dev/positron-python#87: Merge latest upstream after R…
Merged PR posit-dev/positron-python#87: Merge latest upstream after R…