Python module import failed error

D

Dave Angel

i dont know. how do i run pythoin interactively?

By typing the simple command 'python'
davea@think2:~$ python
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

But since you're running some non-python program which is in turn
launching python, perhaps you'd better give more details. And not
scattered over a half dozen tiny emails, but all at once.

Do you, in a single terminal, do the export, then run the
gnuradiocompanion.py ? And does the error message/stacktrace appear in
the same terminal window?

Please show us just what you're running, from start to finish. Thanks.
 
M

matt.doolittle33

gnuradiocompanion.py ? And does the error message/stacktrace appear in

the same terminal window?


hi. ok so i am trying to run the python module (multimode_helper.py) in the GNU radio companion (GRC) which is sort of like an IDE which lets you organize code blocks by arranging them in a flow graph instead of having to write the code that would call the blocks in some particular order. GRC shows the import error in its flow graph error viewer:

Error 0:
Block - import_0_0_0 - Import(import):
Param - Import(import):
Import "import multimode_helper as mh" failed.

The directory /home/matt/bin contains "multimode_helper.py" and this file path is in the PYTHONPATH. I still get the import error however. so now that i know the file path is in PYTHONPATH but i am still getting the import error i am really confused here.

Thanks for your attention.
 
M

matt.doolittle33

gnuradiocompanion.py ? And does the error message/stacktrace appear in

the same terminal window?


hi. ok so i am trying to run the python module (multimode_helper.py) in the GNU radio companion (GRC) which is sort of like an IDE which lets you organize code blocks by arranging them in a flow graph instead of having to write the code that would call the blocks in some particular order. GRC shows the import error in its flow graph error viewer:

Error 0:
Block - import_0_0_0 - Import(import):
Param - Import(import):
Import "import multimode_helper as mh" failed.

The directory /home/matt/bin contains "multimode_helper.py" and this file path is in the PYTHONPATH. I still get the import error however. so now that i know the file path is in PYTHONPATH but i am still getting the import error i am really confused here.

Thanks for your attention.
 
L

Lele Gaifax

Does anyone know why i keep having these double posts?

That's because your posts carry the following headers:

To: (e-mail address removed)
Cc: (e-mail address removed)

or these (from a previous message):

To: (e-mail address removed)
Cc: (e-mail address removed)

So it seems you are answering using Google Groups, *and* putting
“[email protected]†in the CC field. This “forum†has three heads,
one mirroring the others: whatever you send to one of the addresses is
automatically “copied†on the other sides, and viceversa; see also

http://wiki.python.org/moin/GoogleGroupsPython

So, simply avoid adding an explicit CC field when you send your message/reply.

Hope this helps,
bye, lele.
 
M

matt.doolittle33

Here is the PYTHONPATH
['', '/home/matt', '/users/matt/bin', '/home/matt/bin', '/Home/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0..10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
 
C

Chris Angelico

The directory /home/matt/bin contains "multimode_helper.py" and this filepath is in the PYTHONPATH. I still get the import error however. so now that i know the file path is in PYTHONPATH but i am still getting the importerror i am really confused here.

Do you understand how Unix environment variables work? You're using
the 'export' command, but that doesn't make any sort of global change
- it still applies only to things done in the same session. (Actually,
your change applies only to children of the shell where you do it...
but never mind that now.) You may do better by putting the export
command into your .bashrc - that would apply to all sessions created
by your user.

ChrisA
 
D

Dennis Lee Bieber

Here is the PYTHONPATH
['', '/home/matt', '/users/matt/bin', '/home/matt/bin', '/Home/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2',

And that already looks like a mess...

Do you actually have separate directories named

/home

and
/Home

(Linux/UNIX is case sensitive)


And do you really have your account split between

/home/matt

and

/users/matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top