下載並安裝Python-2.7.12.tgz python
問題: linux
http://blog.csdn.net/wanyanxgf/article/details/8021641 python2.7
解決方法以下: ide
1.編輯 vi /etc/ld.so.conf ui
若是是非root權限賬號登陸,使用 sudo vi /etc/ld.so.conf this
添加上python2.7的lib庫地址,如個人/usr/local/Python2.7/lib,保存文件 spa
2.執行 /sbin/ldconfig -v命令,若是是非root權限賬號登陸,使用 sudo /sbin/ldconfig -v。這樣 ldd 才能找到這個庫,執行python2.7就不會報錯了 .net
問題: blog
[root@develop bin]# yum get
[root@develop local]# yum -y install prce
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.6.1 (r261:67515, Aug 7 2010, 11:36:17)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
解決:
http://blog.csdn.net/ei__nino/article/details/8495295
查看python版本
將#!/usr/local/bin/python
改成:#!/usr/bin/python2.6
新裝的python都無論用,用whereis python命令找到了原有的python2.6。
Yum成功修復。