你们如何解决以下问题?这些年来,我已经下载了多个版本的python,现在是3.5.4。我使用的命令是:
virtualenv --system-site-packages -p python3 ./venv
我的错误:
Running virtualenv with interpreter
C:\Users\...\AppData\Local\Programs\Python\Python35-32\python.exe
Using base prefix
'C:\\Users\\...\\AppData\\Local\\Programs\\Python\\Python35-32'
New python executable in C:\Users\...\venv\Scripts\python.exe
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "C:\Users\...\venv\lib\io.py", line 52, in <module>
File "C:\Users\...\venv\lib\abc.py", line 147
print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file)
^
SyntaxError: invalid syntax
ERROR: The executable C:\Users\...\venv\Scripts\python.exe is not functioning
ERROR: It thinks sys.prefix is 'c:\\users\\...' (should be 'c:\\users\\...\\venv')
ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed
Python for "Only this user" or have multiple versions of Python
installed. Copying the appropriate PythonXX.dll to the virtualenv
Scripts/ directory may fix this problem.