problems with python and virtualenvwrapper after updating: No module named virtualenvwrapper

If you have modified your virtualenvwrapper to point to python3, like I do, add the following line in your .bashrc file : export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 making sure that it’s placed before the following line (if you have it): source /usr/local/bin/virtualenvwrapper.sh Then, make sure you install the virtualenv and virtualenvwrapper using: sudo /usr/local/bin/pip3 install virtualenv virtualenvwrapper

Copy complete virtualenv to another pc

Do the following steps on the source machine: workon [environment_name] pip freeze > requirements.txt copy requirements.txt to other PC On the other PC: create a virtual environment using mkvirtualenv [environment_name] workon [environment_name] pip install -r requirements.txt You should be done. Other Resources: How to Copy/Clone a Virtual Environment from Server to Local Machine

pip: Could not find an activated virtualenv (required)

Open your ~/.bashrc file and see if this line is there – export PIP_REQUIRE_VIRTUALENV=true It might be causing the trouble. If it’s there, change it to false and run – source ~/.bashrc If not, run export PIP_REQUIRE_VIRTUALENV=false from terminal. Note: everything works the same if you have .bash_profile instead of .bashrc in your current user’s … Read more

Execute Python script within Jupyter notebook using a specific virtualenv

Here’s what worked for me (non conda python): (MacOS, brew version of python. if you are working with system python, you may (will) need prepend each command with sudo) First activate virtualenv. If starting afresh then, e.g., you could use virtualenvwrapper: $ pip install virtualenvwrapper $ mkvirtualenv -p python2 py2env $ workon py2env # This … Read more

Using VirtualEnv with multiple Python versions on windows

Better: py -3.4 -m venv c:\path\to\wherever\you\want\it If you don’t have the py.exe launcher (but it should be installed) you can replace py -3.4 with c:\Python34\python.exe (assuming the default location) This works because of the handy-dandy, Windows-versioningest, super nice runtime picker py.exe By default, py.exe will be present on a Windows install (I think it comes … Read more