我想使用pip3
安装python软件包。例如,如果我做pip3 install matplotlib
,它会给我:
Collecting matplotlib
Segmentation fault
我已经安装了pip3
和python3.6
:
which pip3
/usr/local/bin/pip3
which python3.6
/usr/local/bin/python3.6
我尝试了sudo pip3 install matplotlib
,它显示:
The directory '/home/shiqi/.cache/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.
我将.cache
目录更改为所有人均可使用:
chmod +rwx .cache
drwxr-xr-x 17 shiqi shiqi 4096 Jan 4 14:45 .cache
我不确定为什么它不是所有人都可写的,但是至少用户具有写到.cache
的权限。但这并不能解决我的细分错误问题。有谁知道该怎么办?谢谢!