I am trying to get a virtual environment for Django development but I cannot get it working.
So far I have:
sudo pip3 install virtualenvwrapper
I have then added the following to /home/pi/.bashrc
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS=' -p /usr/bin/python3 '
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
I then reload the startup file:
source ~/.bashrc
And finally I run:
mkvirtualenv my_django_environment
Which outputs the following:
created virtual environment CPython3.7.3.final.0-32 in 460ms creator CPython3Posix(dest=/home/pi/.virtualenvs/my_django_environment, clear=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/pi/.local/share/virtualenv) added seed packages: pip==20.2.2, setuptools==49.6.0, wheel==0.35.1 activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator virtualenvwrapper.user_scripts creating /home/pi/.virtualenvs/my_django_environment/usr/local/bin/predeactivate ERROR: Environment '/home/pi/.virtualenvs/my_django_environment' does not contain an activate script.
I'm guessing that this is my problem:
ERROR: Environment '/home/pi/.virtualenvs/my_django_environment' does not contain an activate script.
I've not found any recourse online, only these ERROR: Environment '/home/pi/.virtualenvs/cv' does not contain an activate script & https://stackoverflow.com/questions/60252119/error-environment-users-myuser-virtualenvs-iron-does-not-contain-activation-s/60292344#60292344
Neither of which solve my error. Any ideas?
.bashrc
for this, 99% (without exaggeration) of the uses I've seen here are based on the completely erroneous assumption that bashrc is supposed to run at boot to start stuff. Wrong-o. It may run at boot, but that is not because it is supposed to, and there are a lot of other times that are not boot that it may also run. If you too don't know when it is truly supposed to run, why are you using it? All apologies if you do know, and this is on purpose, of course ;) – goldilocks Sep 21 '20 at 13:58