摘要:安裝重新編譯然后重新安裝遇到遇到之后,再重新安裝即可。安裝完成安裝安裝出現問題解決方法修改文件,路徑位于的安裝路徑下的文件。在下添加如下幾行依然報錯嘗試解決依然報錯使用安裝包直接進行安裝,發現是以下問題安裝遇到問題終于大功告成
CentOS大數據實驗環境更改記錄
標簽(空格分隔): 未分類
1.修改163的yum源
使用說明
首先備份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下載對應版本repo文件, 放入/etc/yum.repos.d/(操作前請做好相應備份)
CentOS6
運行以下命令生成緩存
yum clean all yum makecache
2.更新python從2.6.6版本為2.7
#wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2 #tar jxvf Python-2.7.5.tar.bz2 #cd Python-2.7.5 #./configure --prefix=/usr/local #make && make altinstall #mv /usr/bin/python /usr/bin/python2.6.6 #ln -s /usr/local/bin/python2.7 /usr/bin/python
3.安裝pip
1)安裝setuptools
解壓安裝遇到錯誤
RuntimeError: Compression requires the (missing) zlib module
yum install zlib& zilib devel
然后遇到yum因為python版本不對錯誤錯誤:
[root@localhost bin]# yum install pip There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named yum Please install a package which provides this module, or verify that the module is installed correctly. It"s possible that the above module doesn"t match the current version of Python, which is: 2.7.3 (default, Jan 16 2016, 05:59:11) [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] If you cannot solve this problem yourself, please go to the yum faq at: http://yum.baseurl.org/wiki/Faq
查找yum文件,并編輯此py文件
[root@develop local]# which yum /usr/bin/yum [root@develop local]# vi /usr/bin/yum 將 #!/usr/bin/python 改為: #!/usr/bin/python2.6 然后保存OK. 補充:yum基于python寫的。
4.安裝zlib&zlib-devel
重新編譯python
/.configure
make
make install
然后重新安裝setuptools
5.遇到wangqi is not in the sudoers file.
#visudo ## Allow root to run any commands anywhere root ALL=(ALL) ALL wangqi ALL=(ALL) ALL
6.遇到ImportError: cannot import name HTTPSHandler
yum install openssl openssl-devel -y
之后,再重新安裝Python即可。
/.configure
make
make install
7.pip安裝完成
8.安裝numpy,
9.安裝pandas
出現問題:
UnicodeDecodeError: "ascii" codec can"t decode byte 0xe2 in position 32: ordinal not in range(128)
解決方法:
修改mimetypes.py文件,路徑位于python的安裝路徑下的Libmimetypes.py文件。在import下添加如下幾行:
if sys.getdefaultencoding() != "gbk": reload(sys) sys.setdefaultencoding("gbk")
依然報錯:
gcc: error trying to exec "cc1plus": execvp: No such file or directory error: command "gcc" failed with exit status 1
嘗試解決:
yum -y install gcc
依然報錯:
Command /usr/local/bin/python -c "import setuptools, tokenize;__file__="/tmp/pip_build_root/pandas/setup.py";exec(compile(getattr(tokenize, "open", open)(__file__).read().replace(" ", " "), __file__, "exec"))" install --record /tmp/pip-5RbGXm-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pandas Traceback (most recent call last): File "/usr/local/bin/pip", line 9, inload_entry_point("pip==1.5.6", "console_scripts", "pip")() File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 185, in main return command.main(cmd_args) File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 161, in main text = " ".join(complete_log) UnicodeDecodeError: "gbk" codec can"t decode bytes in position 97-98: illegal multibyte sequence
使用安裝包直接進行安裝,發現是以下問題:
gcc: error trying to exec "cc1plus": execvp: No such file or directory error: command "gcc" failed with exit status 1
安裝gcc-c++
[root@localhost pandas-0.17.1]# yum list gcc-c++ Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile Available Packages gcc-c++.i686 4.4.7-16.el6 base [root@localhost pandas-0.17.1]# yum -y install gcc-c++.i686
遇到問題
No local packages or download links found for python-dateutil error: Could not find suitable distribution for Requirement.parse("python-dateutil")
pip install python-dateutil
終于大功告成
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/37718.html
摘要:安裝重新編譯然后重新安裝遇到遇到之后,再重新安裝即可。安裝完成安裝安裝出現問題解決方法修改文件,路徑位于的安裝路徑下的文件。在下添加如下幾行依然報錯嘗試解決依然報錯使用安裝包直接進行安裝,發現是以下問題安裝遇到問題終于大功告成 CentOS大數據實驗環境更改記錄 標簽(空格分隔): 未分類 1.修改163的yum源 使用說明 首先備份/etc/yum.repos.d/CentOS-B...
閱讀 1402·2021-10-11 10:59
閱讀 3103·2019-08-30 15:54
閱讀 2724·2019-08-30 13:19
閱讀 2455·2019-08-30 13:02
閱讀 2371·2019-08-30 10:57
閱讀 3346·2019-08-29 15:40
閱讀 980·2019-08-29 15:39
閱讀 2299·2019-08-29 12:40