Question

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
Was it helpful?

Solution

Try

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top