我的 python 2.7.3
和 ipython 1.2
在我的 Linux
系统(ubuntu 12.04
) 但正在尝试安装类(class)作业所需的更新版本的 matplotlab。
在终端运行此代码行后
user$ sudo easy_install -U distribute
user$ export PYTHONHOME=/usr/lib/python2.7/
现在每次我尝试运行 python
或 ipython
时都会收到错误消息
ImportError: no module named site
我如何扭转/解决这个问题?我迷路了。我查看了其他类似的问题,但没有其他人使用 Linux
并且我不确定该怎么做。
最佳答案
尝试取消设置您的 python 路径...
在 Linux/Mac 中,您可以使用以下命令:
unset PYTHONPATH
unset PYTHONHOME
关于Python/IPython 导入错误 : no module named site,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21874407/