473,396 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

'import site' failed; use -v for traceback

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

Jun 21 '06 #1
1 5741
hu*********@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>

Jun 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dennis | last post by:
The setup: Windows XP Pro Python 2.3 GTK+ 2.2.1.2 and pyGTK 1.99.17 for Python 2.3 from http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ I've downloaded and installed per the instructions the...
2
by: Markus Doering | last post by:
Hello, I just switched from 2.2 to Python 2.3. I am developing an XML/CGI interface to databases as a python package called "unitWrapper" containing several modules which ran fine under v2.2. ...
97
by: Kjetil Torgrim Homme | last post by:
often when re-factoring code, I need to change the indent level of some chunk of code. due to the lack of an end marker, my Emacs has to use heuristics when re-indenting, and this will...
5
by: Steve Holden | last post by:
This is even stranger: it makes it if I import the module a second time: import dbimp as dbimp import sys if __name__ == "__main__": dbimp.install() #k = sys.modules.keys() #k.sort() #for...
2
by: Jon | last post by:
It appears that (windows) python searches in the current working directory before looking in the local site-packages directory, or that '.' comes first in sys.path? The problem arises when I made...
3
by: Jim Hill | last post by:
Well, I've found about a hundred thousand web pages where people have had the same problem I have but nary a page with a solution that works for me. I want to do a simple embed, so I've followed...
6
by: bhochstetler | last post by:
I am on a hp 11.11 machine doing a 64 bit python 2.5 build. When I get my python executable created and run it, I get the error: "import site failed" OverflowError: signed integer is greater...
2
by: Fuzzyman | last post by:
A very odd error with Python 2.5 (both 2.5.1 and 2.5.2 from the official msi installers and running on Vista under Parallels on the Mac). 'import site' fails due to a string in sys.path that...
9
by: rsoh.woodhouse | last post by:
Hi, I'm trying to work out some strange (to me) behaviour that I see when running a python script in two different ways (I've inherited some code that needs to be maintained and integrated with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.