# virtualenv tmp/.venv
New python executable in /root/tmp/.venv/bin/python
Complete output from command /root/tmp/.venv/bin/python -m pip config list:
ERROR: unknown command "config"
----------------------------------------
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 793, in main
symlink=options.symlink,
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 1087, in create_environment
install_wheel(to_install, py_executable, search_dirs, download=download)
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 935, in install_wheel
_install_wheel_with_search_dir(download, project_names, py_executable, search_dirs)
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 964, in _install_wheel_with_search_dir
config = _pip_config(py_executable, python_path)
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 1038, in _pip_config
remove_from_env=["PIP_VERBOSE", "PIP_QUIET"],
File "/usr/lib/python2.7/site-packages/virtualenv.py", line 886, in call_subprocess
raise OSError("Command {} failed with error code {}".format(cmd_desc, proc.returncode))
OSError: Command /root/tmp/.venv/bin/python -m pip config list failed with error code 1
答案1
问题是virtualenv
选择旧版本的pip
。这是 的问题vituelenv==16.3.0
,降级到 可以16.2.0
修复它。这已在 中修复https://github.com/pypa/virtualenv/pull/1303未来版本