Repository navigation
Log indicates failure but .venv folder has been created #19889
Copy link
Copy link
Closed
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked onverifiedVerification succeededVerification succeeded
Milestone
Description
Testing #19883
I am no expert in this and don't really know what success means but I went through the "create env > venv" flow, everything seemed file but checking the logs it reads:
Experiment 'pythonSurveyNotificationcf' is active
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
> conda info --json
> /bin/python3 ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/interpreterInfo.py
Python interpreter path: /bin/python3
Starting Pylance language server.
Running Env creation script: [
'/bin/python3',
'/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py',
'--git-ignore',
'--install'
]
Running: /bin/python3 -m venv .venv
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt install python3.8-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/home/parallels/Code/_samples/.venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
Traceback (most recent call last):
File "/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py", line 60, in run_process
subprocess.run(args, cwd=os.getcwd(), check=True)
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/bin/python3', '-m', 'venv', '.venv']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py", line 130, in <module>
main(sys.argv[1:])
File "/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py", line 115, in main
run_process(
File "/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py", line 62, in run_process
raise VenvError(error_message)
__main__.VenvError: CREATE_VENV.VENV_FAILED_CREATION
> ./.venv/bin/python ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/interpreterInfo.py
Running Env creation script: [
'/bin/python3',
'/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py',
'--git-ignore',
'--install'
]
CREATED_VENV:/home/parallels/Code/_samples/.venv/bin/python
Traceback (most recent call last):
File "/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py", line 130, in <module>
main(sys.argv[1:])
File "/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py", line 124, in main
install_packages(venv_path)
File "/home/parallels/.vscode-insiders/extensions/ms-python.python-2022.15.12701023/pythonFiles/create_venv.py", line 76, in install_packages
raise VenvError("CREATE_VENV.PIP_NOT_FOUND")
__main__.VenvError: CREATE_VENV.PIP_NOT_FOUND
Now I am confused I don't know if this was successful or not
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked onverifiedVerification succeededVerification succeeded
Activity
[-]Log indicate failure but `.venv` folder has been created[/-][+]Log indicates failure but `.venv` folder has been created[/+]karthiknadig commentedon Sep 27, 2022
Johannes Rieken (@jrieken) In this case the environment is created and can be used. But packages cannot be installed in it. We will attempt to discover this earlier and try to fail the whole env creation process.
Fix bugs found during TPI (#19925)
Fix bugs found during TPI (microsoft#19925)
TylerLeonhardt commentedon Oct 4, 2022
What's the best way to verify this?
karthiknadig commentedon Oct 4, 2022
You have to force a failure in
create_venv.pyscript where it checks foris_installed('pip'). Eleanor Boyd (@eleanorjboyd) verified this manually. Forgot to mark this as verified.Fix bugs found during TPI (microsoft/vscode-python#19925)