Answer the question
In order to leave comments, you need to log in
How to properly configure virtualenvwrapper?
Hi all!
I recently decided to try virtualenvwrapper. I found the instruction https://virtualenvwrapper.readthedocs.org/en/lates...
I doubt that I did everything right and ask you to tell me.
So, I put:
sudo pip install --install-option="--user" virtualenvwrapper
Then I configure bash:
export WORKON_HOME=$HOME/web/proj-env #path to the project's virtual environment
export PROJECT_HOME=$HOME/web/proj # path where the project code will be
export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
source /usr/local/bin/virtualenvwrapper_lazy.sh
Next, I go to the folder with the project code ~/web/proj and, in my opinion, I should already have a virtual environment running, but no, every time after closing the terminal, I need to do mkvirtualenv proj-env. python manage.py runserver doesn't work without this - standard error:
Traceback (most recent call last):
File "manage.py", line 8, in
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
If this is true, then what is the fundamental difference from a simple virtual environment when you need to do source bin/activate ?
By the way, when starting the terminal the message is: "bash: /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh: No such file or directory"
Several times deleted, put - it's still there. There is nothing in the ~/.bashrc file except for the added lines (described by me above)...
Answer the question
In order to leave comments, you need to log in
Next, I go to the folder with the project code ~/web/proj and, in my opinion, I should already have a virtual environment running
every time after closing the terminal you need to do
locate virtualenvwrapper.sh
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question