Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Enthought Python instead of the system Python

I've installed the Enthought Python Distribution, which is basically a glorified Python distribution with added libraries for numerical and scientific computing. Now, since I use Debian, there is Python installed already. If I wish to use the Enthought Python for all work, how would I go about doing that?

Right now I am using a rudimentary alias like:

alias python='/usr/local/share/enthought/bin/python'

This is fine, but fails for shebang directives like #! /usr/bin/env python in independent Python scripts. So how do I get the system to use Enthought Python (without breaking anything of course!). Thanks!

like image 587
pewfly Avatar asked Jan 25 '12 19:01

pewfly


People also ask

What is Enthought canopy?

Enthought Canopy is a comprehensive Python-based analysis environment for scientists, engineers and analysts. It provides easy installation of the core analytic and scientific Python packages for rapid data collection, manipulation, analysis and visualization, algorithm design, and application development.

Is Enthought EDM free?

Enthought's Python Distribution is the Python which is installed by EDM or Canopy. It provides over 1000 Python packages to scientists and engineers. It grows weekly, and is available free to all users.


1 Answers

I think this is the official way of doing it, as recommended by Enthought:

export PATH=/usr/local/EPD/bin:$PATH

if you installed to /usr/local/EPD. Otherwise, the general form is

export PATH=/path/to/EPD/bin:$PATH 

This prepends the path to the EPD binary directory to your system PATH variable. The : is some sort of concatenate symbol. You can either run this in terminal every time, or you can put this in your ~/.bashrc file.


Critical Edit:

It turns out that EPD should actually be appended to the PATH, or you may have OS problems. Do it like this:

 export PATH=$PATH:/path/to/EPD/bin
like image 189
Chad Avatar answered Oct 12 '22 20:10

Chad