我正在使用centos linux。
我有 django 的 python 2.6,现在我升级到 python 2.7。
Python 2.6 位于 /usr/lib/python2.6。
Python 2.7 位于 /usr/local/lib/python2.7。
它们都有 site-packages 目录,并且都包含 django 1.2。
如果我运行 python,我会得到 2.7 版本。
我的问题是,如果尝试导入 django 我得到
ImportError:没有名为 django 的模块
我不确定我的 PYTHONPATH 在哪里定义,如果这是我需要更改的。任何人 ?
我最终建立了一个指向 2.6 站点包目录的符号链接。