Open lmy668 opened 6 months ago
@lmy668 This looks like you might have some issues with the pyenv installed python. This actually has nothing to do with the python extension, it is just not able to create environment using that python, try running this manually to see if it works, from a terminal:
D:\Program Files\python\pyenv-win\versions\3.8.10\python.exe -m venv .venv
@karthiknadig thanks, the detail below running command in cmd.
E:\Python\chatgpt-on-wechat>"D:\Program Files\python\pyenv-win\versions\3.8.10\python.exe" -m venv .venv
Error: Command '['E:\\Python\\chatgpt-on-wechat\\.venv\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 101.
yes, it raises problem. and it create this directory .env, but this content is uncompleted
in addition, i try to run this command, it seems to be normal. but i do not run this manually each time. if python version is 3.7.0, it is successful to create venv using vscode.
E:\Python\chatgpt-on-wechat>"D:\Program Files\python\pyenv-win\versions\3.8.10\python.exe" -m venv .venv --without-pip
E:\Python\chatgpt-on-wechat>
Would it be possible to try and uninstall the 3.8 from pyenv and try and install it again? There might be something wrong with the environment. Typically, the pip issue occurred on Linux where you have to explicitly install it. But on windows it is usually available, so I am assuming there is some issue in the 3.8 install.
yes, i just uninstall and reinstall 3.8.10 from pyenv on windows, it still has same problems. Do not 3.8+ support venv?
E:\Python\chatgpt-on-wechat>pyenv --version
The system cannot find the path specified.
pyenv 3.1.1
2024-05-25 12:33:04.266 [info] > "D:\Program Files\python\pyenv-win\versions\3.8.10\python.exe" ~\.vscode\extensions\ms-python.python-2024.4.1\python_files\create_venv.py --git-ignore
2024-05-25 12:33:04.266 [info] cwd: .
2024-05-25 12:33:04.495 [info] Running: D:\Program Files\python\pyenv-win\versions\3.8.10\python.exe -m venv .venv
2024-05-25 12:33:04.705 [info] Error: Command '['e:\\Python\\chatgpt-on-wechat\\.venv\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 101.
2024-05-25 12:33:04.712 [info] Traceback (most recent call last):
File "d:\Users\li\.vscode\extensions\ms-python.python-2024.4.1\python_files\create_venv.py", line 84, in run_process
2024-05-25 12:33:04.712 [info] subprocess.run(args, cwd=os.getcwd(), check=True)
File "D:\Program Files\python\pyenv-win\versions\3.8.10\lib\subprocess.py", line 516, in run
2024-05-25 12:33:04.712 [info] raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['D:\\Program Files\\python\\pyenv-win\\versions\\3.8.10\\python.exe', '-m', 'venv', '.venv']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\Users\li\.vscode\extensions\ms-python.python-2024.4.1\python_files\create_venv.py", line 250, in <module>
2024-05-25 12:33:04.713 [info] main(sys.argv[1:])
File "d:\Users\li\.vscode\extensions\ms-python.python-2024.4.1\python_files\create_venv.py", line 219, in main
2024-05-25 12:33:04.714 [info] run_process(
File "d:\Users\li\.vscode\extensions\ms-python.python-2024.4.1\python_files\create_venv.py", line 86, in run_process
raise VenvError(error_message)
__main__.VenvError: CREATE_VENV.VENV_FAILED_CREATION
2024-05-25 12:33:04.729 [error] Error while running venv creation script: CREATE_VENV.VENV_FAILED_CREATION
2024-05-25 12:33:04.729 [error] CREATE_VENV.VENV_FAILED_CREATION
2024-05-25 12:33:05.870 [info] > .\.venv\Scripts\python.exe -I ~\.vscode\extensions\ms-python.python-2024.4.1\python_files\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2024.4.1\python_files\interpreterInfo.py
2024-05-25 12:33:05.920 [error] [Error: Command failed: e:\Python\chatgpt-on-wechat\.venv\Scripts\python.exe -I d:\Users\li\.vscode\extensions\ms-python.python-2024.4.1\python_files\get_output_via_markers.py d:\Users\li\.vscode\extensions\ms-python.python-2024.4.1\python_files\interpreterInfo.py
Unable to create process using 'D:\Program Files\python\pyenv-win\versions\3.8.10\python.exe -I d:\Users\li\.vscode\extensions\ms-python.python-2024.4.1\python_files\get_output_via_markers.py d:\Users\li\.vscode\extensions\ms-python.python-2024.4.1\python_files\interpreterInfo.py'
1、open recent project 2、 create venv using vscode 3、 select interpreter 3.8.10-64bit 4、 report problem below