![]() |
|
#1
|
|||
|
|||
Module import problemI'm having trouble with importing modules for python2.3
The modules I want to import are located in: /usr/local/lib/python2.3/site-packages in various subdirectories. I've setup PYTHONPATH in my bash profile with the following: PYTHONPATH = /usr/local/lib/python2.3/site-packages; export PYTHONPATH While this works for some modules, it doesn't work for others. Even if I append the full path to a particular module to PYTHONPATH, the import function still can't find it. What's more is that this seems to be intermittent for certain modules. One minute, I can import a module from python using the import, command. If I try again later, the module can't be found. I was under the impression that if I simply gave the path to the top of the directory structure where my modules are kept, then python would search through sub-directories by its self until the file is found. I'm really stumped at the moment, any help would be appreciated. |
|||
|
#2
|
||||
|
||||
Re: Module import problemSorry no one's replied to you. I didn't notice this posting until just now.
Offhand, I would say this is not a problem w/ Python but a problem w/ your system setup, though I can't say for certain. What system are you using? Also, does it make a difference if you move the modules to somewhere else, like where the "normal" path is looking? While I'm thinking about it, you might also try updating to Python v2.4. It's possible that it's a bug that's already been fixed. __________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#3
|
|||
|
|||
Re: Module import problemThanks for your reply. The problem seems to be remidied now though. You were right, it was a problem with my setup, not with python. It seems I was using an outdated compiler when I was building the framework that was going to use python. Since then I've been experiencing other problems, but I guess I'll bug you experts in another thread. Thanks again for the reply.
|
Recent GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi-client application using sockets | shereen | Java Forum | 0 | 03-Mar-2006 09:25 |
| Graphic problem in Unreal Tournament 2004 | zerox | Computer Software Forum - Games | 10 | 09-Oct-2005 12:31 |
| Runtime Problem involving "printf" in C Program | supamakia | C Programming Language | 2 | 09-Oct-2005 10:09 |
| a significant problem after installing Xp | mohammad | Computer Software Forum - Windows | 10 | 09-Aug-2005 07:03 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The