Canopy 2.1: Managing and switching between Python 2.7 and 3.5 environments

Overview

In Canopy 2.1, internet-connected users (and all users of the Enthought Deployment Server) can create, manage, and switch between multiple Python 2.7 and 3.5 environments, with different environments containing different package sets. When you switch to a particular Python environment in Canopy 2.1, it is used throughout Canopy -- in the Package Manager, Editor, Python panel, Debugger, Data Import Tool, Jupyter Notebook, and Canopy Command Prompt / Terminal.

Choice of Python environment

On Windows, Canopy 2.1.1 and above provide eight predefined environments:

  • Python 2.7 or Python 3.5
  • Standard or Full package sets
  • either 64-bit normal Python build, or 32-bit legacy-compatible Python build.

On either Mac or Linux, Canopy 2.1.1 and above provide four predefined environments:

  • Python 2.7 or Python 3.5
  • Standard or Full package sets
  • all 64-bit.

In Canopy 2.3, you will be able to use different Python environments (2.7, 3.5, or 3.6) simultaneously in different Canopy windows, and there will be a friendly user interface for creating and switching between these environments.

We strongly recommend the Standard package set for almost all users. Full package sets are only recommended when there are no plans to use the Package Manager to update any packages or install new packages (i.e. permanently disconnected users, and administrators installing static environments for multiple users). For other users, installing the full package set will be a waste of time, bandwidth and disk space, and installing and updating packages in the Package Manager will often be impossible because of over-constrained package dependency relationships in the legacy full package set.

The 32-bit legacy-compatible build on Windows is rarely appropriate, except for users who need to interface their Python code with 32-bit applications or libraries (for example 32-bit Excel, using PyXLL).

Installer choices

As a convenience, we provide a downloadable Canopy installer corresponding to each of these environments, but you can start with any installer and subsequently create / use any of the other predefined environments for your OS.

Usually you will select the installer that best fits your normal needs, and it will provide your default User Python environment. 

For details, see "Installing a new Canopy version => Which Canopy installer should I download?".

 

Post-installation environment management

When you want to use a different environment, the Python tab in Canopy 2.1's Preferences dialog has a section that allows you to create and remove Python environments, and to select which of these will be used in Canopy.

You can create a new environment based on the same package set that is included with the Canopy installer that you used, or you can select another of the predefined "environment bundles" for your OS described above. Installing an environment from one of these bundles requires an Internet connection.

Only one environment can be active (in use) at a time. Changing which environment is active requires Canopy to be restarted.

For step-by-step instructions, please see "Switching Python Environments", in the Canopy 2.1 Documentation.

You can also create and manage multiple arbitrary Python environments using Canopy's embedded Enthought Deployment Manager (EDM), which is accessible in any shell where your Canopy Python is the default Python, e.g. a Canopy Command Prompt or Canopy Terminal.

Canopy 2.1, other than the Package Manager, can also be integrated with environments created with a freestanding, non-embedded, EDM. That is outside the scope of this article.

 

Internet-disconnected users

Internet-disconnected users whose organization uses the Enthought Deployment Server have all the above capabilities (as well as the ability to install internal packages into any environment using the Package Manager or EDM).

For other disconnected users, Canopy 2.1 does not yet provide a multi-environment solution. You can only use the environment corresponding to the last Canopy installer that you installed (and whose environment you accepted.) A solution is forthcoming.

Please do not enter support requests in article comments

Please use article comments for suggestions to improve the article. See "How to submit Enthought Canopy/EPD support requests".

Have more questions? Submit a request

Comments

Powered by Zendesk