This section provides answers to specific questions raised by early users, tips for using the environment and other specific suggestions.
Canopy uses a Python capability known as virtual environments to enable several important features, discussed below. For those readers not familiar with the concept, virtual environments allow Canopy to essentially ‘clone’ the master Python installation into your account without actually having to duplicate all of the files. That is, when Python starts in a virtual environment the interpreter looks for packages first in the virtual environment and then, if not found, transparently looks in the base environment for the package.
For example, consider the setup in the illustration below:
In this example, the command import numpy executed in the virtual environment will load NumPy 1.7 because it is installed in the virtual environment. Because Python will look in the base Python environment for any packages it doesn’t find in the virtual environment, the command import scipy will correctly load SciPy as well even though it isn’t installed in the virtual environment.
Canopy uses a base environment and two virtual environments.
The Canopy installation tree is the base (a.k.a. Core) Python environment and includes all of the base packages needed to display the Canopy UI. As of Canopy 1.1, this base Python environment has two child virtual environments (in Canopy 1.0, these were a child and a grandchild).
The System Python Environment is where the Canopy GUI actually runs. This environment is maintained by Canopy’s application updates. Users will not directly update its packages, nor run their code here.
The User Python Environment is where your own Python code, as well as Python applications such as IPython and Mayavi, run. This environment is maintained by the user with the Canopy Package Manager (or, equivalently, with the “enpkg” command-line tool).
Both the System and User Python virtual environments are created the first time Canopy starts, and are unique to each user, allowing per-user customization.
This structure has several important advantages for Canopy users. First, Canopy can update itself without requiring administrative privileges by installing updates to the System Python Environment rather than to the core application install which may have been installed by an administrator (read-only).
Second, it saves considerable amounts of disk space because large packages such as NumPy or Qt which are used by both the GUI and User Python environments are only installed once.
Finally, as a user, you have the full freedom to update Python packages in the User Python Environment without risk of destabilizing the Canopy environment you are working in and, when Canopy is updated, the changes won’t impact code you have running in your environment.
The table below shows the location of the User Python Environment on each platform.
|Windows XP||64||C:\Documents and Settings\<username>\Local Settings\Application Data\Enthought\Canopy\User|
|Windows XP||32||C:\Documents and Settings\<username>\Local Settings\Application Data\Enthought\Canopy32\User|
|Windows 7 & Vista||64||C:\Users\<username>\AppData\Local\Enthought\Canopy\User|
|Windows 7 & Vista||32||C:\Users\<username>\AppData\Local\Enthought\Canopy32\User|
A network proxy or proxy firewall is a computer that sits between the local network and the larger internet to filter connections. When a computer on the local network wish to connect to a machine outside the local network, instead of connecting directly to it, the computer instead connect to a proxy server, which then handles the connection to the outside world.
Usually, users will not need to reference these files. Most preferences are usually set from the Preferences dialog in the GUI. If there is a GUI error, a dialog should ask you if you want to report it, which should send the relevant log file to Enthought.
However, if you need to access these files, here are their platform-specific locations:
|Windows XP||C:\Documents and Settings\<user>\Application Data\Enthought\Canopy\preference.ini|
|Windows 7 & Vista||C:\Users\<user>\AppData\Roaming\Enthought\Canopy\preferences.ini|