virualenv -p /usr/bin/python3.7 venv 在执行时提示

1
2
....
setuptools pkg_resources pip wheel failed with error code 1

仔细上翻你会发现更详细的信息

1
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.tuna.tsinghua.edu.cn/simple/pkg-resources/

应该是清华的源同步没有完全造成的,据说其他的源也都没有这个 pkg-resources ,只好修改配置使用官方源了

1
vim ~/.config/pip/pip.conf

把原有 index-url 注释掉,添加一行保存即可

1
index-url = http://e.pypi.python.org/simple