user3780183
user3780183

Reputation: 29

Why doesnt python see module?

I have the next problem with Python 2.7.3:

There's little project with the next structure (see at the end); through virtual environment Python doesn't see a module, but before it did.

I've already tried rebooting and reinstalling virtualenv directory—nothing. Also, if I run the necessary script file out of any virtual environment (using ipython), it finds that module. I've been looking for the problem all night. Can anybody help me? For example, I'm trying to run the script from delete_ME_after.py (inside of it there's importing module base.config_parser).

Also, I've already set path to this project to PYTHONPATH—also nothing works.

enter image description here

Upvotes: 0

Views: 111

Answers (1)

Jens
Jens

Reputation: 9130

As it turns out, the above PYTHONPATH variable contains a tilde ~ which isn't expanded to the full home directory as expected. See here for more information.

Use one of the following instead:

export PYTHONPATH=/path/to/home/smm
export PYTHONPATH=${HOME}/smm

Upvotes: 2

Related Questions