2015-03-13 37 views
0

我似乎無法找到關於此的文檔。 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

回答

0

我從源代碼構建。:(令人驚訝的並不難,但遇到了很多這樣的交互部分的問題(在redhat 4太老爲了讓大家能夠做到交互式後端,我需要一個更新的機器。)

# get matplotlib 
wget https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.3/matplotlib-1.4.3.tar.gz 

#uncompress 
tar xvzf matplotlib-1.4.3.tar.gz 

# open build install 
# read INSTALL file for more instructions 
cd matplotlib-1.4.3 
python setup.py build 
# actually installing needed superuser privileges 
sudo python setup.py install 

希望這爲類似設置的其他人節省了時間。

0

在CentOS 7我Python安裝3.6.1,到/ usr /本地

這也自動安裝PIP

然後我跑須藤/usr/local/bin/pip3.6安裝matplotlib

而且都很好

相關問題