1. 程式人生 > >[pip]Pip安裝依賴於six的庫失敗的解決方法

[pip]Pip安裝依賴於six的庫失敗的解決方法

安裝一些庫的時候會報錯如下:

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:
...
sudo pip install six --upgrade --ignore-installed six

即可解決(libName 庫名)
Mac自己安裝了python3的可以用pip3

原因是Apple預安裝的這個six庫出於安全原因被設定為sudo也不可以執行操作,所以需要依賴於高版本的庫就需要更新six,但是沒有six的許可權,所以就會報錯。

安裝 tensorflow

sudo pip install tensorflow --upgrade --ignore-installed six



連結:https://www.jianshu.com/p/45fb07007ddc