我从系统的Python 2.6.4中删除了numpy和scipy内容,以便为它们安装不同的版本,现在我打破了YUM。我得到的错误是:Fedora:使用YUM时没有名为RPM的模块
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named rpm
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.4 (r264:75706, Jun 4 2010, 18:20:31)
[GCC 4.4.4 20100503 (Red Hat 4.4.4-2)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
而且当我从Python控制台我得到以下错误内导入YUM:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 23, in <module>
import rpm ImportError:
No module named rpm
Python的状态很好,我设法安装numpy的,但是我想用YUM安装scipy,我不能。当我运行时:
rpm --version
我得到:RPM版本4.8.1。
有没有办法解决这个问题?我会很感激任何意见或指示解决这个问题。
不知道如何解决你的问题,但是一旦你把它整理出来,你应该使用[virtualenv](http://virtualenv.readthedocs.org/en/latest/)并且保留你的基本Python安装。 Virtualenv可以轻松创建独立的Python环境及其管理,并且可以在不干扰主要安装的情况下玩耍。 – mhawke 2014-10-10 13:52:12