[Distutils] --single-version-externally-managed bug?

chris cdcasey at gmail.com
Thu Aug 14 18:45:15 CEST 2008


I recently installed a package using python setup.py
--single-version-externally-managed --record record.txt option. In my
site-packaged folder, there is now two new folders and a file.

<top-of-package-namespace>/
<package>-<version>.egg-info/
<package>-<version>-nspkg.pth

Now when I start up python, I get the message

'import site' failed; use -v for traceback

When I do python -v, I get the following traceback:

# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.5/site.pyc matches /usr/lib/python2.5/site.py
import site # precompiled from /usr/lib/python2.5/site.pyc
# /usr/lib/python2.5/os.pyc matches /usr/lib/python2.5/os.py
import os # precompiled from /usr/lib/python2.5/os.pyc
import posix # builtin
# /usr/lib/python2.5/posixpath.pyc matches /usr/lib/python2.5/posixpath.py
import posixpath # precompiled from /usr/lib/python2.5/posixpath.pyc
# /usr/lib/python2.5/stat.pyc matches /usr/lib/python2.5/stat.py
import stat # precompiled from /usr/lib/python2.5/stat.pyc
# /usr/lib/python2.5/UserDict.pyc matches /usr/lib/python2.5/UserDict.py
import UserDict # precompiled from /usr/lib/python2.5/UserDict.pyc
# /usr/lib/python2.5/copy_reg.pyc matches /usr/lib/python2.5/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.5/copy_reg.pyc
# /usr/lib/python2.5/types.pyc matches /usr/lib/python2.5/types.py
import types # precompiled from /usr/lib/python2.5/types.pyc
import _types # builtin
# zipimport: found 78 names in
/usr/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg
# /usr/lib/python2.5/new.pyc matches /usr/lib/python2.5/new.py
import new # precompiled from /usr/lib/python2.5/new.pyc
'import site' failed; traceback:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site.py", line 415, in <module>
    main()
  File "/usr/lib/python2.5/site.py", line 400, in main
    paths_in_sys = addsitepackages(paths_in_sys)
  File "/usr/lib/python2.5/site.py", line 206, in addsitepackages
    addsitedir(sitedir, known_paths)
  File "/usr/lib/python2.5/site.py", line 169, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/usr/lib/python2.5/site.py", line 138, in addpackage
    exec line
  File "<string>", line 1, in <module>
KeyError: 'enthought'
# /usr/lib/python2.5/warnings.pyc matches /usr/lib/python2.5/warnings.py
import warnings # precompiled from /usr/lib/python2.5/warnings.pyc
# /usr/lib/python2.5/linecache.pyc matches /usr/lib/python2.5/linecache.py
import linecache # precompiled from /usr/lib/python2.5/linecache.pyc
import encodings # directory /usr/lib/python2.5/encodings
# /usr/lib/python2.5/encodings/__init__.pyc matches
/usr/lib/python2.5/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.5/encodings/__init__.pyc
# /usr/lib/python2.5/codecs.pyc matches /usr/lib/python2.5/codecs.py
import codecs # precompiled from /usr/lib/python2.5/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.5/encodings/aliases.pyc matches
/usr/lib/python2.5/encodings/aliases.py
import encodings.aliases # precompiled from
/usr/lib/python2.5/encodings/aliases.pyc
# /usr/lib/python2.5/encodings/ascii.pyc matches
/usr/lib/python2.5/encodings/ascii.py
import encodings.ascii # precompiled from /usr/lib/python2.5/encodings/ascii.pyc
Python 2.5.1 (r251:54863, Jan 10 2008, 18:01:57)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.5/lib-dynload/readline.so", 2);
import readline # dynamically loaded from
/usr/lib/python2.5/lib-dynload/readline.so
# /usr/lib/python2.5/atexit.pyc matches /usr/lib/python2.5/atexit.py
import atexit # precompiled from /usr/lib/python2.5/atexit.pyc
# /usr/lib/python2.5/rlcompleter.pyc matches /usr/lib/python2.5/rlcompleter.py
import rlcompleter # precompiled from /usr/lib/python2.5/rlcompleter.pyc


More information about the Distutils-SIG mailing list