473,663 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1846
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_p ath', '_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_p ath', '_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.ma ndrakesoft.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', 'getcheckinterv al',
'getdefaultenco ding', 'getdlopenflags ', 'getfilesysteme ncoding',
'getrecursionli mit', 'getrefcount', 'hexversion',
'last_traceback ', 'last_type', 'last_value', 'lib', 'maxint',
'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks',
'path_importer_ cache', 'platform', 'prefix', 'ps1', 'ps2',
'setcheckinterv al', 'setdlopenflags ', 'setprofile',
'setrecursionli mit', '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******@bigpo nd.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
2052
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 "/usr/lib/python2.2/distutils/command/build_ext.py", line 231,
6
2003
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 I was using Windows. So I uninstalled Python, downloaded the latest python 2.3 and compiled it from source. Now when I try to import bsddb, I get this error...... >>> import bsddb
11
6411
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 use the OutP command to write to directly to a memory address. Thank you -- Todd
3
1439
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 /usr/lib/python2.3/config/Makefile (No such file or directory) # Of course, the error is correct in that there is no such file. There is not even a python2.3/ config directory. Is the Mandrake
3
1438
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 = unicode(s, 'gbk')
1
1483
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 install tout se passe sans problème. Pourtant lorsque je lance Python la version affichée est toujours 2.3.3 au lieu de 2.3.4 Etant nouveau dans le monde Linux j'apprécierai votre aide pour m'expliquer
1
2874
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 build/temp.linux-i686-2.3/src/interface/GLUT.o -L/usr/lib -L/usr/local/lib -L/usr/X11/lib -L/usr/X11R6/lib -Lbuild/temp.linux-i686-2.3 -lGL -lX11 -lXext -lGLU -lglut -lXi -lXmu -linterface_util -o build/lib.linux-i686-2.3/OpenGL/GLUT.so
10
2153
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 sometimes find a way to do things that aren't supported. Unfortunately, I'm not that clever, especially about installing things. The last time I tried to install DB2 V8.1 on Mandrake, I hit a roadblock that I wasn't able to overcome. There were...
1
2160
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 preparing the DB2 Setup Wizard which will guide you through the program setup process. Please
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.