Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

'import site' failed; use -v for traceback

230 views
Skip to first unread message

huwje...@gmail.com

unread,
Jun 21, 2006, 11:50:19 AM6/21/06
to
Hi There,

I've installed python2.4-dev on Unbuntu linux. When I run it, it gives
an error:

'import site' failed; use -v for traceback

(Get the same result if I uninstall it and install regular python2.4).

Using -v traceback gives:

'import site' failed; traceback:
ImportError: No module named site

Python is installed in:
/usr/bin/python
/usr/lib/python2.4

File listing of /usr/lib/python2.4:
aifc.py htmlentitydefs.py rlcompleter.py
anydbm.py htmllib.py robotparser.py
asynchat.py HTMLParser.py sched.py
asyncore.py httplib.py sets.py
atexit.py ihooks.py sgmllib.py
audiodev.py imaplib.py shelve.py
base64.py imghdr.py shlex.py
BaseHTTPServer.py imputil.py shutil.py
Bastion.py keyword.py SimpleHTTPServer.py
bdb.py lib-dynload SimpleXMLRPCServer.py
binhex.py lib-old site-packages
bisect.py LICENSE.txt smtpd.py
bsddb locale.py smtplib.py
calendar.py logging sndhdr.py
CGIHTTPServer.py _LWPCookieJar.py SocketServer.py
cgi.py macpath.py statcache.py
cgitb.py macurl2path.py statvfs.py
chunk.py mailbox.py stringold.py
cmd.py mailcap.py stringprep.py
codecs.py markupbase.py _strptime.py
codeop.py mhlib.py sunaudio.py
code.py mimetools.py sunau.py
colorsys.py mimetypes.py symbol.py
commands.py MimeWriter.py symtable.py
compiler mimify.py tabnanny.py
config modulefinder.py tarfile.py
cookielib.py _MozillaCookieJar.py telnetlib.py
Cookie.py multifile.py test
csv.py mutex.py this.py
curses netrc.py _threading_local.py
dbhash.py new.py threading.py
decimal.py nntplib.py timeit.py
difflib.py ntpath.py toaiff.py
dircache.py nturl2path.py trace.py
distutils os2emxpath.py tty.py
doc pdb.doc tzparse.py
doctest.py pdb.py unittest.py
DocXMLRPCServer.py __phello__.foo.py urllib2.py
dumbdbm.py pickletools.py urllib.py
dummy_threading.py pipes.py urlparse.py
dummy_thread.py pkgutil.py UserList.py
email plat-linux2 user.py
encodings poplib.py UserString.py
filecmp.py posixfile.py uu.py
fileinput.py pprint.py wave.py
formatter.py pty.py weakref.py
fpformat.py pyclbr.py webbrowser.py
ftplib.py pydoc.py whichdb.py
getpass.py Queue.py whrandom.py
gettext.py quopri.py xdrlib.py
gopherlib.py reconvert.py xml
gzip.py regex_syntax.py xmllib.py
heapq.py regsub.py xmlrpclib.py
hmac.py rexec.py zipfile.py
hotshot rfc822.py


Have noticed that python-minimal is installed with Unbuntu and can't be
easily removed, but running "which python" shows it's running the
proper version (python2.4). Any ideas?

Many Thanks,

Huw

Fredrik Lundh

unread,
Jun 21, 2006, 12:04:07 PM6/21/06
to pytho...@python.org
huwje...@gmail.com wrote:
> Hi There,
>
> I've installed python2.4-dev on Unbuntu linux. When I run it, it gives
> an error:
>
> 'import site' failed; use -v for traceback
>
> (Get the same result if I uninstall it and install regular python2.4).
>
> Using -v traceback gives:
>
> 'import site' failed; traceback:
> ImportError: No module named site
>
> Python is installed in:
> /usr/bin/python
> /usr/lib/python2.4
>
> File listing of /usr/lib/python2.4:

where's the site.py file ?

> Bastion.py keyword.py SimpleHTTPServer.py
> bdb.py lib-dynload SimpleXMLRPCServer.py
> binhex.py lib-old site-packages
> bisect.py LICENSE.txt smtpd.py
> bsddb locale.py smtplib.py

</F>

0 new messages