I have an application which is deployed on heroku and runs, with Python 2.7.6 . On the local machine, the same Python version, I get import error for the module where is located the launcher:
(VIRTUALENV)$ python pybossa/web.py
Traceback (most recent call last):
File "pybossa/web.py", line 31, in <module>
import pybossa
ImportError: No module named pybossa
The pybossa folder has __ init__.py with this content:
__version__ = "0.1"
You likely have a mismatch in the environment in the 2 execution cases.
You could set add the parent of the pybossa dir to your PYTHONPATH (just an example, but it's better to try to match the environments, other surprises can lurk in there otherwise):
$~/tmp> python pybossa/web.py
Traceback (most recent call last):
File "pybossa/web.py", line 1, in <module>
import pybossa
ImportError: No module named pybossa
$~/tmp> echo $PYTHONPATH
PYTHONPATH: Undefined variable.
$~/tmp> setenv PYTHONPATH '.'
$~/tmp> python pybossa/web.py
$~/tmp>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With