安裝一些庫的時候會報錯如下:
Installing collected packages: six
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.
Uninstalling six-1.4.1:
...
參考外網(wǎng)大神的解釋
把安裝的命令改成
sudo pip install six --upgrade --ignore-installed six
即可解決(libName 庫名)
Mac自己安裝了python3的可以用pip3
原因是Apple預(yù)安裝的這個six庫出于安全原因被設(shè)置為sudo也不可以執(zhí)行操作银萍,所以需要依賴于高版本的庫就需要更新six赃承,但是沒有six的權(quán)限校哎,所以就會報錯。