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