Update the version of Python in a virtualenv
What is virtualenv
It's pretty typical to do Python coding within a virtual environment. The virtual environment isolates any Python packages/dependencies to that environment so they do not impact your system level packages or packages in another virtual environment. It solves the common dilemma of maintaining dependencies when “Project A depends on version 1.x but Project B depends on version 2.x”. You can set up a different virtual environment for each of your Python projects, each with different package dependencies or different versions of the same packages. Or you can set up a new virtual environment to test how your project will work with different package versions. virtualenv is a tool you use to create these isolated Python environments. virtualenvwrapper is a set of extensions for virtualenv designed to simplify working with virtual environments.
The problem with updating Python in a virtualenv
A glaring issue with virtualenv
is that although it is quite simple to install/remove/update or otherwise maintain any Python packages installed in the virtual environment, virtualenv
provides no built in way to upgrade or change the version of the Python interpreter installed in the virtual environment.
[Read more…]about Update the version of Python in a virtualenv