virtualenv cannot find module in site-packages

My Tensorflow mysteriously failed at the server. Without root access, I have to compile it from the source, to configure the GPU device. The error is module not found. Tried to pip install the module multiple times, but it still does not work. I can see the package in my site-packages directory, changed access to executable, but still not working.

It turns out that, I have set the PYTHONPATH variable in my ~/.bashrc, and pip installed packages to that specified directory. When I was trying to import the package, it could not find from the virtualenv directories. After removed the PYTHONPATH from my ~/.bashrc, everything works like a charm.

Leave a Reply

Your email address will not be published. Required fields are marked *