django The project is migrated locally to linux Server error : Can't find django.
Mingming project is connected with the environment venv To the server , Why can't I find it .
Configure the environment variables of the virtual environment
vim ~/.bash_profile
Add the following commands completely on the last line ,
export PYTHONPATH=/home/myproject/myapp/venv/Lib/site-packages
export LD_LIBRARY_PATH="/usr/local/lib"
/home/myproject/myapp/venv This is my own project , Depending on the path of the virtual environment
When the configuration is complete , Save and exit . Refresh the environment variables , Enable environment variables .
source ~/.bash_profile
---------------------------
Here's another one .
Activate the virtual environment in the project venv
source venv/bin/activate