Skip to main content

Tool to create isolated Python environment

Project description

This tool creates an environment that is isolated from the rest of the Python installation, eliminating site-packages and any other source of modules, so that only the modules (and versions) you install into the environment will be available. This allows for isolated and controlled environments, as well as reproduceability.

To use workingenv just download the script and run it.

The basic usage is:

python workingenv.py MyNewEnvironment
source MyNewEnvironment/bin/activate

After sourcing bin/activate any commands (like easy_install, python setup.py install, etc) will install into the new environment. A Windows activate.bat file is also generated for that environment.

The workingenv.py script has other options, like --home (necessary when using this with Zope), --requirements (for starting the environment with a specific set of packages) and others.

Changes

0.4: Fix the interaction of the --site-packages option (that brings in the global site-packages/ directory) and a global installation of setuptools. If you get an error like “site.py is not a setuptools-generated site.py; please remove it” you should upgrade and regenerate your workingenv.

0.3: Support for Setuptools 0.6c5

Project details


Supported by

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