Skip to main content

Wrapper for virtualenv, pip, and wheel

Project description

A wrapper for virtualenv, pip, and wheel that caches wheels to speed up virtualenv creation.


  • Create and maintain a cache of wheels.
  • Create a virtualenv and install packages from the wheel cache in a single command.
  • Add to the wheel cache as new packages are built.
  • Download the virtualenv source code when not already installed or out of date.

Note that this package should be considered alpha/unstable! Latest PyPI version


  • Python 2.7
  • Unix-like systems (ie, not Windows)


Create a wheel cache (~/.mkvenv by default):

% mkvenv init
% mkvenv list-wheels
# Wheels in /Users/nhoffman/.mkvenv/2.7.7/

Now create a new virtualenv named test-env and install some packages. As each package is installed, a wheel is first built and saved to the cache, along with wheels for any dependencies:

% cat requirements.txt
% mkvenv install --venv test-env -r requirements.txt
% test-env/bin/pip freeze
% mkvenv list-wheels
# Wheels in /Users/nhoffman/.mkvenv/2.7.7/ =

Subsequent requests to install any of these packages will use the cached wheels.

Installation from the wheel cache can speed things up a lot when packages require compilation:

% cat scientific.txt
% mkvenv install --venv sci-env -r scientific.txt
620.66s user 36.41s system 75% cpu 14:28.52 total
% mkvenv install --venv another-env -r scientific.txt
10.87s user 4.82s system 18% cpu 1:24.65 total


Installation is most easily performed from PyPi using pip:

pip install mkvenv

Alternatively, obtain the source code from either PyPi ( or GitHub ( and install by running either python install or pip install . from within the package directory. Installation provides a script named mkvenv as an entry point. may also be executed directly from the top level of the package directory.

Alternatively, note that the mkvenv script is implemented as a single python file that can be invoked directly as a script. This script can be downloaded and used to create a virtualenv on a system on which the virtualenv package is not available:


It may also be useful to distribute along with other projects to facilitate creation of execution environments.


Run mkvenv -h for a list of subcommands and common options, or mkvenv <subcommand> -h for help on a subcommand. Note that common options must be provided before the name of the subcommand (eg, mkvenv -v wheelstreet -r requirements.txt)

Known Bugs

There’s a known bug in pip using python 2.7 on OS X ( - the issue is not specific to this project) that results in an error on installation from PyPI with the message “AssertionError: Multiple .dist-info directories” after a previous installation. The solution is to delete any residual pip build directories:

find /private -name 'mkvenv' -exec rm -r "{}" \; 2> /dev/null

Project details

Download files

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

Files for mkvenv, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size mkvenv-0.2.3-py2-none-any.whl (7.3 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size mkvenv-0.2.3.tar.gz (7.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page