【发布时间】:2019-12-09 22:16:27
【问题描述】:
我在 Windows 7 中的 Python 3.73 上创建虚拟环境时出错。
在创建新的虚拟环境期间,我收到如下错误。
有人可以帮我解决这个问题吗?我已经搜索了大量信息,但没有任何帮助。
提前致谢
Using base prefix 'C:\\Users\\Саша\\AppData\\Local\\Programs\\Python\\Python37-32'
New python executable in C:\Users\Саша\myenv\Scripts\python.exe
Command C:\Users\Саша\myenv\Scripts\python.exe -m pip config list had error code 1
Installing setuptools, pip, wheel...
Complete output from command C:\Users\Саша\myenv\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\Саша\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 193, in _run_module_as
"__main__", mod_spec)
File "C:\Users\Саша\AppData\Local\Programs\Python\Python37-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Саша\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 2635, in <module>
main()
File "C:\Users\Саша\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 870, in main
symlink=options.symlink,
File "C:\Users\Саша\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 1173, in create_e
install_wheel(to_install, py_executable, search_dirs, download=download)
File "C:\Users\Саша\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 1019, in install_
_install_wheel_with_search_dir(download, project_names, py_executable, search_dirs)
File "C:\Users\Саша\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 1110, in _install
arch_dir
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=script)
File "C:\Users\Саша\AppData\Roaming\Python\Python37\site-packages\virtualenv.py", line 963, in call_subp
raise OSError("Command {} failed with error code {}".format(cmd_desc, proc.returncode))
OSError: Command C:\Users\Саша\myenv\Scripts\python.exe - setuptools pip wheel failed with error code 1
【问题讨论】:
-
ModuleNotFoundError: No module named 'pkgutil'- 尝试手动安装此模块并重试
标签: python virtualenv virtual environment