Last active
February 7, 2019 21:05
-
-
Save bolinocroustibat/2da9805d8146c6501cec7beb8b1d0494 to your computer and use it in GitHub Desktop.
Apache + Python venv + Django: module not found
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module 'django_project' not found | |
=> Logiquement et après seulement un an de recherche il faut ajouter le dir au python path. | |
Normalement il suffit de faire un export PYTHONPATH="${PYTHONPATH}:/var/www/django_project" | |
mais ca marche que en shell, pas en apache/venv | |
DONC => Créer un "nano /var/www/venv/spie/lib/python3.5/site-packages/django_project.pth" (fichier .pth) | |
Dans lequel on met le ou les paths "/var/www/django_project" ici |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment