.. _faq: Tips, Tricks, and Frequently Asked Questions ============================================ This section provides answers to specific questions raised by early users, tips for using the environment and other specific suggestions. .. _venv_where_are_packages: Where are all of the Python packages in my User Python Environment? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: .. image:: virtual-env.png 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. .. _user_py_env_platform: The table below shows the location of the User Python Environment on each platform. ===================== ======= =================================================================== Platform Version Location ===================== ======= =================================================================== Windows XP 64 ``C:\Documents and Settings\\Local Settings\Application Data\Enthought\Canopy\User`` Windows XP 32 ``C:\Documents and Settings\\Local Settings\Application Data\Enthought\Canopy32\User`` Windows 7, 8 & Vista 64 ``C:\Users\\AppData\Local\Enthought\Canopy\User`` Windows 7, 8 & Vista 32 ``C:\Users\\AppData\Local\Enthought\Canopy32\User`` Mac OSX 64 ``~/Library/Enthought/Canopy_64bit/User`` Mac OSX 32 ``~/Library/Enthought/Canopy_32bit/User`` Linux 64 ``~/Enthought/Canopy_64bit/User`` Linux 32 ``~/Enthought/Canopy_32bit/User`` ===================== ======= =================================================================== .. _proxy_firewall: How do I use Canopy when behind a proxy firewall? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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. For more information, see `"Using Canopy Behind a Proxy Firewall" `_ in the Enthought Support Knowledge Base. .. _pref-log-file-locations: Where are the preference and log files located? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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: ======================== =================================================================== Platform Location ======================== =================================================================== Windows XP ``C:\Documents and Settings\\Application Data\Enthought\Canopy\preference.ini`` Windows 7, 8 & Vista ``C:\Users\\AppData\Roaming\Enthought\Canopy\preferences.ini`` Mac OS ``~/.canopy/preferences.ini`` Linux ``~/.canopy/preferences.ini`` ======================== =================================================================== .. Local Variables: mode: rst indent-tabs-mode: nil sentence-end-double-space: nil fill-column: 80 End: