Skip to main content

Python multi-version wrapper for virtualenv.

Project description

virtualenv-multiver is a wrapper around virtualenv, the standard tool for creating isolated Python environments. It’s built to allow multiple versions of Python to be usable within a single environment. This is really handy when you’re doing development and testing across a range of Python versions, and you don’t want to have to juggle your active environment for every version.

Installation

Simple:

pip install virtualenv-multiver

Usage

Also simple. To create a new virtual environment, just provide the path to that environment and the versions you want installed. For example:

virtualenv-multiver ~/venvs/my-project 2.7 3.6 3.7 3.8

Or:

virtualenv-multiver ~/venvs/my-project pypy pypy3

The resulting virtual environment will include all those versions of Python without any additional configuration.

FAQ

How does this work?

virtualenv-multiver runs through the list of Python versions provided and calls out to virtualenv for each version

After each virtualenv call, it fixes up the tree a bit. This involves:

  • Ensuring symlinks point to the right place (python2 points to the latest python2.* specified, for instance)

  • Patching any installed scripts (such as pip3.8) and making sure it points to the correct, versioned interpreter

  • Moves and patches some binaries and configuration files around to avoid collision issues.

Once done, it sets the top-level symlinks for python2, python3, pip2, pip3, etc. (any that specify a major version) to point to the latest version in that series.

It then sets the generic, version-less ones (python, pip, etc.) to point to the Python 2 versions (if Python 2 is installed), or Python 3 (if not). This helps ensure compatibility with scripts that expect python to mean “Python 2”.

Are all versions of CPython supported?

Yes. Pretty much. It depends on whether virtualenv itself will support the version.

Is PyPY supported?

Yes. Sorta.

PyPy doesn’t cleanly install alongside CPython in a virtual environment, due to CPython and PyPy claiming some of the same files and directories. We only allow PyPy to install independently or alongside another PyPy.

You may have issues even with multiple PyPy installations. They’ll install and run, but will share the same site-packages directory, which is beyond our control for the moment.

If this isn’t a problem for you, go for it. Otherwise, you may want to stick to a standard virtualenv call for those.

How do I report a bug?

You can file an issue on the GitHub issue tracker.

Who uses this?

We use virtualenv-multiver at Beanbag for our Review Board and RBCommons products.

If you use this, let us know and we’ll add you to a list here!

What else do you build?

Lots of things. Check out some of our other open source projects.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

virtualenv-multiver-2.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

virtualenv_multiver-2.0-py3.8.egg (14.6 kB view details)

Uploaded Egg

virtualenv_multiver-2.0-py3.7.egg (14.6 kB view details)

Uploaded Egg

virtualenv_multiver-2.0-py3.6.egg (14.6 kB view details)

Uploaded Egg

virtualenv_multiver-2.0-py2.py3-none-any.whl (8.9 kB view details)

Uploaded Python 2Python 3

virtualenv_multiver-2.0-py2.7.egg (14.6 kB view details)

Uploaded Egg

File details

Details for the file virtualenv-multiver-2.0.tar.gz.

File metadata

  • Download URL: virtualenv-multiver-2.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.17

File hashes

Hashes for virtualenv-multiver-2.0.tar.gz
Algorithm Hash digest
SHA256 14f9cdc647f38974c80ddb3fb96f01c8d007516ea326ea72471202f3b915a446
MD5 c6f714246004b0566487c03994dedacf
BLAKE2b-256 274e9636716587ebd611358481fb494483192b3d5c2f86fe7e614643c1645db0

See more details on using hashes here.

File details

Details for the file virtualenv_multiver-2.0-py3.8.egg.

File metadata

  • Download URL: virtualenv_multiver-2.0-py3.8.egg
  • Upload date:
  • Size: 14.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.17

File hashes

Hashes for virtualenv_multiver-2.0-py3.8.egg
Algorithm Hash digest
SHA256 b17d32166c7de6979bf5bcb528f7897c7ff45737da142b1a0b3d9aa1df724a45
MD5 ae6462573648ce19ea030d20b7f00dd7
BLAKE2b-256 c03dc13046863aae546980b44eb01b2ea9d8905eb619fe9b5616ed93de8447eb

See more details on using hashes here.

File details

Details for the file virtualenv_multiver-2.0-py3.7.egg.

File metadata

  • Download URL: virtualenv_multiver-2.0-py3.7.egg
  • Upload date:
  • Size: 14.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.17

File hashes

Hashes for virtualenv_multiver-2.0-py3.7.egg
Algorithm Hash digest
SHA256 89afa102a516f107553eda198ecd61216ccc4960549e5ef1baf464c26bb98ac9
MD5 593e9f91e64eb72047f1a1105b62fa22
BLAKE2b-256 109f0d0cab7eeaf5d888de991d249dec958667b7025e5dbb56d1ae62c22e4560

See more details on using hashes here.

File details

Details for the file virtualenv_multiver-2.0-py3.6.egg.

File metadata

  • Download URL: virtualenv_multiver-2.0-py3.6.egg
  • Upload date:
  • Size: 14.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.17

File hashes

Hashes for virtualenv_multiver-2.0-py3.6.egg
Algorithm Hash digest
SHA256 cf9c13e7710c4729ad4077132c12d257ee8f5dd6a3a6d8cb5f306676fdad78ca
MD5 89658e611dd4f12eee3afe210e77af8f
BLAKE2b-256 47434228695929c07b579370737a77504a431d0cfb24fc767aa52af54fced183

See more details on using hashes here.

File details

Details for the file virtualenv_multiver-2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: virtualenv_multiver-2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.17

File hashes

Hashes for virtualenv_multiver-2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 819b7c814408dcf16022f360a0e9eedc206cdc36f27e5a2fe6bdebdcd0d2f6f6
MD5 f961a977be35f29a557b30c11849a9fd
BLAKE2b-256 a37cc38718fe3d525cdeaaaae5d2058ad60cf0f6bb6d205787a0fa37071c637b

See more details on using hashes here.

File details

Details for the file virtualenv_multiver-2.0-py2.7.egg.

File metadata

  • Download URL: virtualenv_multiver-2.0-py2.7.egg
  • Upload date:
  • Size: 14.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.17

File hashes

Hashes for virtualenv_multiver-2.0-py2.7.egg
Algorithm Hash digest
SHA256 209012793af0d0a437dee9773f770098ffb2b650c53d042e05ad33fa126e27e6
MD5 32798b9d17de21dc8d010dac6a039b13
BLAKE2b-256 fcac531b369d4106b19626a094af2e3e3208620c531baf1680675b0cfa64afa4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page