Python scripts

37 views
Skip to first unread message

Peter O'Doherty

unread,
Jan 25, 2011, 3:14:33 PM1/25/11
to athe...@googlegroups.com
Hi,
What changes do I need to make to allow me to use python scripts in a folder other than the main athenaCL folder? The message I'm getting at the minute is:

Traceback (most recent call last):
  File "test.py", line 2, in <module>
    from athenaCL.libATH import athenaObj
ImportError: No module named athenaCL.libATH

Thanks,
Peter

christopher ariza

unread,
Jan 26, 2011, 9:24:45 AM1/26/11
to athe...@googlegroups.com

hi peter.

assuming you did not install athenacl in python's site-packages, you can just add the directory that contains the athenaCL directory to your sys.path.

an example is here:
http://docs.python.org/install/index.html#inst-search-path

if you need more examples let me know.

Peter O'Doherty

unread,
Jan 26, 2011, 11:04:55 AM1/26/11
to athe...@googlegroups.com
Hi,
I tried this but I'm still getting the same error. What am I doing wrong?

>>> import sys
>>> sys.path.append('/home/peter/audiowork/athenaCL-2.0.0a15/athenaCL')

christopher ariza

unread,
Jan 28, 2011, 3:12:35 PM1/28/11
to athe...@googlegroups.com

you might need to add the outer directory, so it would be as follows:

>>> sys.path.append('/home/peter/audiowork/athenaCL-2.0.0a15')

Reply all
Reply to author
Forward
0 new messages