How to install external packages into Canopy?
Question: I am new to python and Canopy. I have searched for the possible solutions
online, including the support forum of Enthought Canopy, but failed to solve
my problem by following the instructions under other similar questions.

I use Mac OS, and wanted to install external python packages to my Enthought
Canopy (specifically, a new package named "ggplot"
(<https://github.com/yhat/ggplot/>)).

The instructions on the support forum of Enthought
(<https://support.enthought.com/entries/23389761-Installing-packages-into-
Canopy-Python-from-the-command-line>) said " follow standard Python
installation procedures from the OS command line ". However, I could only
install this package to my previous python library (system default python).
When I want to import this module in Canopy, it failed. I thought I might need
to change the installation path in order to install this package in Canopy,
but not sure how to change and where to change.

When I want to use Sublime text to run my scripts when I set Enthought as
default python env, it succeeded so I guess it still imported the package from
my previous python library. How can I know which environment the editor is
currently using?

Thanks!


Answer: 1) The cited article links to [another
article](https://support.enthought.com/entries/23646538-Make-Canopy-s-Python-
be-your-default-Python-i-e-on-the-PATH-), which describes how to make Canopy
Python be the default python, and states that the easiest way is simply to use
the Canopy Preferences dialog to make Canopy be your default Python.

If you prefer not to do that, the article suggests that you modify the PATH
environment variable (note that this is not actually an "installation path"
but a more general path used for locating programs to run for any reason.)

So I'm guessing that you don't know how to do this? Here's a simple way. From
a terminal, type the following (substituting your own user name) before
continuing with the installation:

` export PATH=/Users/your-user-
name/Library/Enthought/Canopy_64bit/User/bin:${PATH} `

2) To find out what environment your editor is using, run the following
program:

    
    
    import sys
    print sys.prefix
    

