ripper234
ripper234

Reputation: 230038

Problem using PYTHONPATH

I'm trying to use PYTHONPATH to let Python know where my library is located, but it seems to ignore it:

$ PYTHONPATH=/home/osqa/EC2/backup/src/boto/
$ ls /home/osqa/EC2/backup/src/boto/boto/ec2/connection.py
/home/osqa/EC2/backup/src/boto/boto/ec2/connection.py

$ python backup.py
Traceback (most recent call last):
  File "backup.py", line 4, in <module>
    from boto.ec2.connection import EC2Connection
ImportError: No module named boto.ec2.connection

Upvotes: 0

Views: 2406

Answers (1)

Sven Marnach
Sven Marnach

Reputation: 601609

Try

export PYTHONPATH=/home/osqa/EC2/backup/src/

instead, i.e. use export and remove the last path component.

Upvotes: 3

Related Questions