我似乎無法找到關於此的文檔。 Matplotlib說運行:在RedHat上安裝matplotlib理想情況下使用yum
sudo yum install python-matplotlib
安裝所有的依賴關係,這版本matplotlib的成功:
python-matplotlib.x86_64 0:0.99.1.2-1.6.amzn1
不過,我使用python2.7,單獨安裝。原來的(現在仍然存在)python2.6現在可以成功導入matplotlib。在RedHat for python2.7上有相關的matplotlib包嗎?我不知道how to use this page on python-matplotlib packages。
其他信息:
which python2.6
回報/usr/bin/python2.6
which python
回報/usr/bin/python
。cat /proc/version
回報
Linux version 3.14.23-22.44.amzn1.x86_64 ... (Red Hat 4.8.2-16) (GCC) ...
別的東西,我試過:
我還試圖用pip2.7代替,installed all the dependancies,它broke on this issue有關權限。解決方法是重置問題文件的權限:
chmod o+x /path/to/file
但是,它是臨時複製文件。 :(在安裝過程中matplotlib它在重新複製這個文件,所以我不能設置它的權限,這是它被打破的地方:
g++ ... -lpython2.7 -o build/lib.linux-x86_64-2.7/matplotlib/backends/_backend_agg.so
running install_lib
copying pylab.py -> /usr/lib64/python2.7/site-packages
error: [Errno 13] Permission denied: '/usr/lib64/python2.7/site-packages/pylab.py'
這似乎並不喜歡做的正確方法,這太拼湊起來的。
問題先問在Unix&Linux stackexchange。