安装pytest失败,(Pip安装依赖于six的库失败的解决方法)
错误说明:
Installing collected packages: six, setuptools, funcsigs, py, attrs, pluggy, pytest
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
原因:
原因是Apple预安装的这个six库出于安全原因被设置为sudo也不可以执行操作,所以需要依赖于高版本的库就需要更新six,但是没有six的权限,所以就会报错。
six, setuptools, funcsigs, py, attrs, pluggy, pytest这几个库都没有执行权限,需要手动执行一下
解决办法:
sudo pip install six --upgrade --ignore-installed six
参考来源:https://www.jianshu.com/p/45fb07007ddc

浙公网安备 33010602011771号