#🔒 Virtual Environment Creation Error

12 messages · Page 1 of 1 (latest)

ripe idol
#

How to fix this? someone assist me ;w;. Been trying to create a virtual environment but it keeps showing this 😭

USER\\OneDrive\\Documents\\Saberforce Promos\\R2D2\\.venv'
2025-02-09 11:09:51.990 [info] Traceback (most recent call last):
  File "c:\Users\HP USER\.vscode\extensions\ms-python.python-2025.0.0-win32-x64\python_files\create_venv.py", line 96, in run_process
2025-02-09 11:09:51.991 [info]     subprocess.run(args, cwd=os.getcwd(), check=True)  # noqa: PTH109
2025-02-09 11:09:51.991 [info]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-02-09 11:09:51.991 [info] ^^
  File "C:\Users\HP USER\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run
2025-02-09 11:09:51.992 [info]     raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\HP USER\\AppData\\Local\\Programs\\Python\\Python312\\python.exe', '-m', 'venv', '.venv']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\Users\HP USER\.vscode\extensions\ms-python.python-2025.0.0-win32-x64\python_files\create_venv.py", line 262, in <module>
2025-02-09 11:09:51.992 [info]     main(sys.argv[1:])
  File "c:\Users\HP USER\.vscode\extensions\ms-python.python-2025.0.0-win32-x64\python_files\create_venv.py", line 231, in main
2025-02-09 11:09:51.992 [info]     run_process(
  File "c:\Users\HP USER\.vscode\extensions\ms-python.python-2025.0.0-win32-x64\python_files\create_venv.py", line 98, in run_process
2025-02-09 11:09:51.992 [info]     raise VenvError(error_message) from exc
VenvError: CREATE_VENV.VENV_FAILED_CREATION
2025-02-09 11:09:52.015 [error] Error while running venv creation script:  CREATE_VENV.VENV_FAILED_CREATION
2025-02-09 11:09:52.016 [error] CREATE_VENV.VENV_FAILED_CREATION
ocean agateBOT
#

@ripe idol

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

blazing thistle
#

also, have you tried using py -m venv .venv instead of python -m venv .venv?

ripe idol
#

The system cannot find the file specified: 'C:\Users\HP USER\OneDrive\Documents\Saberforce Promos\R2D2\.venv'

#

already

blazing thistle
ripe idol
#

hold on

blazing thistle
# ripe idol hold on

another thing we often see here is people on windows having problem with python downloaded from microsoft store, we generally recommend uninstalling it and then downloading and installing python from the official site: https://www.python.org/downloads/ (check the box about adding python to the path on the bottom of the first screen)
then use py -m venv .venv instead of python -m venv .venv

ripe idol
#

ok

ocean agateBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.