473,387 Members | 1,863 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,387 software developers and data experts.

Mandrake 10.1 and Python 2.3.4

Hi everyone. I've been getting this error message in python, and it's
really driving me up the wall.
[joal@localhost joal]$ python
'import site' failed; use -v for traceback
Python 2.3.4 (#1, Apr 18 2005, 19:03:06)
[GCC 3.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.


Here's the relevant line when i run python in verbose mode:
'import site' failed; traceback:
Traceback (most recent call last):
File "/usr/lib/python2.3/site.py", line 169, in ?
sys.lib,
AttributeError: 'module' object has no attribute 'lib'

Is this a Mandrake or a Python mistake?
And does anyone know how to fix it?

I think this is the reason why I'm getting errors when it comes to
importing other python packages.

Joal
Jul 19 '05 #1
3 1814
Hi Joal,
I can only tell you that in my Linux Mandrake 10.1 (Community Edition),
all is ok:
Python 2.3.4 (#2, Aug 19 2004, 15:49:40)
[GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import site
dir (site) ['_Helper', '_Printer', '__builtin__', '__builtins__', '__doc__',
'__file__', '__name__', '_dirs_in_sys_path', '_init_pathinfo', '_test',
'addpackage', 'addsitedir', 'encoding', 'here', 'makepath', 'os',
'prefixes', 'sitedirs', 'sys']

This can't exclude that the error is in Mandrake's site (if you have
the Official Edition), but I can't help you further because I am not
an expert.
Bye.

Jul 19 '05 #2
qw******@yahoo.it wrote:
Hi Joal,
I can only tell you that in my Linux Mandrake 10.1 (Community Edition),
all is ok:
Python 2.3.4 (#2, Aug 19 2004, 15:49:40)
[GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import site
dir (site)
['_Helper', '_Printer', '__builtin__', '__builtins__', '__doc__',
'__file__', '__name__', '_dirs_in_sys_path', '_init_pathinfo', '_test',
'addpackage', 'addsitedir', 'encoding', 'here', 'makepath', 'os',
'prefixes', 'sitedirs', 'sys']

This can't exclude that the error is in Mandrake's site (if you have
the Official Edition), but I can't help you further because I am not
an expert.
Bye.


Likewise, 10.1 official (powerpack) is OK:

[steve@StevesPC steve]$ cat /proc/version
Linux version 2.6.8.1-12mdk (qu******@n5.mandrakesoft.com) (gcc
version 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)) #1 Fri Oct 1
12:53:41 CEST 2004
[steve@StevesPC steve]$ python
Python 2.3.4 (#2, Aug 19 2004, 15:49:40)
[GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
import sys
dir(sys) ['__displayhook__', '__doc__', '__excepthook__', '__name__',
'__stderr__', '__stdin__', '__stdout__', '_getframe',
'api_version', 'arch', 'argv', 'builtin_module_names',
'byteorder', 'call_tracing', 'callstats', 'copyright',
'displayhook', 'exc_clear', 'exc_info', 'exc_type', 'excepthook',
'exec_prefix', 'executable', 'exit', 'getcheckinterval',
'getdefaultencoding', 'getdlopenflags', 'getfilesystemencoding',
'getrecursionlimit', 'getrefcount', 'hexversion',
'last_traceback', 'last_type', 'last_value', 'lib', 'maxint',
'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks',
'path_importer_cache', 'platform', 'prefix', 'ps1', 'ps2',
'setcheckinterval', 'setdlopenflags', 'setprofile',
'setrecursionlimit', 'settrace', 'stderr', 'stdin', 'stdout',
'version', 'version_info', 'warnoptions']

Perhaps you should uninstall and reinstall python, in case a file
is corrupt.

Steve
Jul 19 '05 #3

"Joal Heagney" <jh******@bigpond.net.au> wrote in message
news:As****************@news-server.bigpond.net.au...
'import site' failed; traceback:
Traceback (most recent call last):
File "/usr/lib/python2.3/site.py", line 169, in ?
sys.lib,
AttributeError: 'module' object has no attribute 'lib'
Right: the sys module usually has no .lib attribute that I know of
import sys; sys.lib

Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'lib'
Is this a Mandrake or a Python mistake?
It is a site.py code mistake, but who wrote your copy of site.py?
And does anyone know how to fix it?


Correct or remove the offending line (169)

Terry J. Reedy

Jul 19 '05 #4

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

Similar topics

1
by: Wayne Pierce | last post by:
I have been working on installing the Python bindings for Milters on a Mandrake 9.x system. When I type: python setup.py build I get the following error (last 4 lines of output): File...
6
by: Dfenestr8 | last post by:
I started off trying to use bsddb with my standard mandrake 9 python 2.2.1 package. The shell reported back no such module. Strange, thinks I. I thought it was standard in the package, it was when...
11
by: Todd Gardner | last post by:
--------------------------------------------------------------- I would appreciate any ideas how to write to the parallel port (Mem 0x378) when runnning WinXP or Mandrake 9.2. In C and LabVIEW I...
3
by: R.Marquez | last post by:
I tried installing gadfly 1.0 on Mandrake 9.2 and got the following: # python setup.py install running install error: invalid Python installation: unable to open...
3
by: Anthony Liu | last post by:
The superuser of the Mandrake system in my lab installed cjkcodecs for python. But there is a problem. I can encode english alphabets like 'a', 'b', 'c' or 'abc' like so: s = 'abc' s =...
1
by: P. Jouin | last post by:
Après avoir récupéré l'archive de la version Python 2.3.4 j'ai procédé à l'extraction de celle-ci. Ensuite en root j'ai procédé au processus classique : ../configure && make et ensuite un make...
1
by: danu kusmana | last post by:
Im using Python 2.3.4 and Mandrake linux 10.0. I don't know whats wrong when Im trying to install the PyOpengl-2.0.1.08. I got the message: gcc -pthread -shared...
10
by: Rhino | last post by:
Has anyone managed to get DB2 V8.1 to install and run on Linux Mandrake 9.1/9.2? I know that IBM does not officially support DB2 on Mandrake but I also know that the clever people who buy DB2...
1
by: Eveline | last post by:
Hi all, I am trying to install IBM DB2 V8.1 on Mandrake Linux 10.1. Java is installed and when I try to run db2setup as a root, I get the following error: # ./db2setup DBI1190I db2setup is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.