Python 2.6 を使用していて、django タグ付けパッケージをインストールしようとすると、以下のエラーが表示されます。すでに python2.6 がインストールされている 64 ビット マシンにいくつかの python 2.4 パッケージをインストールしています。
このエラーを解決する方法
[root@tom django-tagging-0.3.1]# python setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from distutils.command.install import INSTALL_SCHEMES
File "/usr/lib64/python2.6/distutils/command/install.py", line 21, in <module>
from site import USER_BASE
ImportError: cannot import name USER_BASE
EDIT 1
[root@tom django-tagging-0.3.1]# python2.6 setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from distutils.command.install import INSTALL_SCHEMES
File "/usr/lib64/python2.6/distutils/command/install.py", line 21, in <module>
from site import USER_BASE
ImportError: cannot import name USER_BASE
EDIT2
>>> from distutils.sysconfig import get_python_lib
>>> print(get_python_lib())
/usr/lib/python2.6/site-packages
EDIT3
>>> import site ; print site
<module 'site' from '/opt/mysite/site/__init__.pyc'>