【virtualenv】记录Mac上一次令人无语的python virtual environment安装

在Mac上安装Python virtualenv时遇到了各种错误,包括语法错误、依赖包找不到、权限问题等。通过更新homebrew,升级git,解决Python安装路径问题,最终成功安装并配置了virtualenv和virtualenvwrapper。
摘要由CSDN通过智能技术生成

首先用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

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值