为什么这一步也会出错???
来源:3-2 python虚拟环境之virtualenv
Ray_George
2019-08-25 10:05:46
C:\envs>virtualenv django2.2
Using base prefix 'c:\\users\\罾\\desktop\\ray george'
New python executable in C:\envs\django2.2\Scripts\python.exe
Command C:\envs\django2.2\Scripts\python.exe -m pip config list had error code 1
Installing setuptools, pip, wheel...
Complete output from command C:\envs\django2.2\Scripts\python.exe - setuptools pip wheel:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
ModuleNotFoundError: No module named 'pkgutil'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "c:\users\罾\desktop\ray george\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\罾\desktop\ray george\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\罾\Desktop\Ray George\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
File "c:\users\罾\desktop\ray george\lib\site-packages\virtualenv.py", line 870, in main
symlink=options.symlink,
File "c:\users\罾\desktop\ray george\lib\site-packages\virtualenv.py", line 1173, in create_environment
install_wheel(to_install, py_executable, search_dirs, download=download)
File "c:\users\罾\desktop\ray george\lib\site-packages\virtualenv.py", line 1019, in install_wheel
_install_wheel_with_search_dir(download, project_names, py_executable, search_dirs)
File "c:\users\罾\desktop\ray george\lib\site-packages\virtualenv.py", line 1110, in _install_wheel_with_search_dir
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=script)
File "c:\users\罾\desktop\ray george\lib\site-packages\virtualenv.py", line 963, in call_subprocess
raise OSError("Command {} failed with error code {}".format(cmd_desc, proc.returncode))
OSError: Command C:\envs\django2.2\Scripts\python.exe - setuptools pip wheel failed with error code 1
麻烦看看,我不知道为啥会有这个错误,谢谢
1回答
好帮手乔木
2019-08-25
同学你好:
同学可以尝试使用:
virtualenv envname(虚拟环境的名称) --no-setuptools --no-pip --no-wheel
建议:
同学的创建目录下最好不要出现中文,避免出现编码问题。
如果我解决了同学的问题,请采纳!学习愉快^_^。
相似问题