【发布时间】:2011-01-24 11:36:37
【问题描述】:
我正在使用 Ubuntu。我安装了更新版本的python。但是我安装的所有库,如 imdbPy、NumPy、Cython 等都可以在版本号为 2.6.6 的以前版本的 python 中运行。
当我在 2.6.6 中导入 Cython 时,tt 可以工作,但我在 2.7.0+ 版本的 python 中尝试同样的事情
import cython
出现如下错误:
import cython
ImportError: No module named cython
我需要更改 bash 中使用的默认 python 版本。我想,我可以通过修改 bash 配置文件来处理它。我还想将所有这些库移动到适当的位置,以便新版本的 python 可以永久访问它们。
【问题讨论】:
-
你的第二个例子大写 Cython,python 区分大小写,所以不要这样做。
标签: python pythonpath