One - One Code All

Blog Content

mac中pandas安装不成功,报错its parent directory is not owned by the current user

Python Linux-Mac   2018-07-18 20:25:05

mac中pandas安装不成功,报错its parent directory is not owned by the current user

报错信息:

The directory '/Users/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.


这是因为 mac OS X10.11  开启了一个验证功能。 System、Usr目录 默认情况下不能操作的,这个警告不影响操作

解决方案:
$ pip install --upgrade pip
$ sudo pip install numpy --upgrade --ignore-installed
$ sudo pip install scipy --upgrade --ignore-installed
$ sudo pip install scikit-learn --upgrade --ignore-installed
$ sudo pip install pandas --upgrade --ignore-installed


上一篇:Sublime Text 中断程序的快捷键
下一篇:Linux软链接的创建、删除和更新

The minute you think of giving up, think of the reason why you held on so long.