python import error

smilesonisamal at gmail.com smilesonisamal at gmail.com
Tue Dec 10 22:56:23 EST 2013


Hi,
   I am a new bie in python I was trying to execute the python script aaa.py in fedora which imports different modules. Actually when I am executing the aaa.py I am getting the following error and PYTHON_PATH=/bin/python which has a symlink to python-2.7. Please help me in this regard? I am not getting any clue where I am wrong.


python -c "import sys; print sys.path"
['', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gst-0.10', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']


aaa.py
=======
Traceback (most recent call last):
  File "aaa.py", line 5, in <module>
    from ccc.ddd import sss
ImportError: No module named ccc.ddd

directory structure as follows:

ccc
|
 ddd
   |
    aaa.py
    sss.py


Regards
Pradeep



More information about the Python-list mailing list