The problem is solved due to add a python path: add2virtualenv '/home/robert/Vadain/vadain.webservice.curtainconfig/'
manage.py help has different python path in virtualenv
-
24-09-2022 - |
Question
I have a problem in virtualenv that a wrong python path is imported.
The reason is that by running the command:
manage.py help --pythonpath=/home/robert/Vadain/vadain.webservice.curtainconfig/
The result is right, but when I run manage.py help
then I missing some imports.
I searched on the internet, but nothing is helped. The last change I have done is at the end of the file virtualenvs/{account}/bin/activate added the following text:
export PYTHONPATH=/home/robert/Vadain/vadain.webservice.curtainconfig
But this not solving the problem, somebody else's suggestion to fix this problem?
Solution 2
OTHER TIPS
Don't see any problem there. You could also insert something like:
import sys
sys.path.append('/home/robert/Vadain/vadain.webservice.curtainconfig/')
into your manage.py
Or you write a setup.py
for your package and install it into your virtualenv (which would be the preferred way (pip install -e
)