首先用sudo /usr/bin/easy_install virtualenv时,报了错:
File "build/bdist.macosx-10.15-x86_64/egg/zipp.py", line 240
def open(self, mode='r', *args, pwd=None, **kwargs):
^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
Removing /Library/Python/2.7/site-packages/zipp-0.0.0-py2.7.egg
Copying zipp-0.0.0-py2.7.egg to /Library/Python/2.7/site-packages
zipp 0.0.0 is already the active version in easy-install.pth
Installed /Library/Python/2.7/site-packages/zipp-0.0.0-py2.7.egg
error: The 'zipp>=0.4' distribution was not found and is required by importlib-resources
pkg_resources.DistributionNotFound: The 'zipp>=0.4' distribution was not found and is required by importlib-resources
(以及不死心的试了一下virtualenv命令果然获得了-bash: vritualenv: command not found)
然后就开始艰辛的查资料改错过程……
先试了sudo pip3 install virtualenv,结果报了错,说是有个东西已经安装了,而且更tm坑的是没法覆盖安装
Installing collected packages: filelock, virtualenv
Attempting uninstall: filelock
Found existing installation: filelock 2.0.12
ERROR: Cannot uninstall 'filelock'. It is a distutils installed project and thus we cannot accurately determine which files belong t