newbie question: On installation of additional packages to Python

N

Nasser Abbasi

hello;

I have not used Python before directly, but I am interested in trying it.
I've read some good things about it. ( I am mainly interested in trying it
for some scientific applications and simulation.)

I am running on windowz. I have downloaded and installed 2.5.1 Python.

my question is on installing additional packages.

What is the easiest way to do that? I read about python 'eggs' (like jar
files for Java), and easyInstall script, and such.

Is there some automated way to install Python packages? a manual/document I
could read that describes step by step how to do that? Browsing the
documentation, there does not seem to be something specific there (other
than saying download this tar file and install it).

I like how one can install additional packages in 'R' . In 'R' one can do
all that from the user interface for R by a pull-down menu, then one selects
a mirror site, then one can see all the packages available, then select the
package to download, and the rest is done automatically. (The package is
downloaded, installed, etc...)

Anything like that exists for Python? Btw, I have VM running on windowz,
and so I can run Python on Ubuntu linux on that VM, would be easier to
install additional Python packages there, may be using that nice GUI based
Ubuntu package manager to do that?

thanks,
Nasser
 
G

Gabriel Genellina

I am running on windowz. I have downloaded and installed 2.5.1 Python.

my question is on installing additional packages.

What is the easiest way to do that? I read about python 'eggs' (like jar
files for Java), and easyInstall script, and such.

Once you have setuptools installed, it's as easy as executing:
easy_install packagename
The alternative is to find and download the package yourself, unzip in a
temporary directory, and execute: setup.py install
For most packages that's all that is required.
Is there some automated way to install Python packages? a
manual/document I
could read that describes step by step how to do that? Browsing the
documentation, there does not seem to be something specific there (other
than saying download this tar file and install it).

I like how one can install additional packages in 'R' . In 'R' one can do
all that from the user interface for R by a pull-down menu, then one
selects
a mirror site, then one can see all the packages available, then select
the
package to download, and the rest is done automatically. (The package is
downloaded, installed, etc...)

That's mainly what easy_install does, plus dependency checking.
 
S

Steve Holden

Gabriel said:
Once you have setuptools installed, it's as easy as executing:
easy_install packagename
The alternative is to find and download the package yourself, unzip in a
temporary directory, and execute: setup.py install
For most packages that's all that is required.


That's mainly what easy_install does, plus dependency checking.
So, the only step you are missing is how to install setuptools. This is
simplicity itself:

1. In your web browser visit

http://peak.telecommunity.com/dist/ez_setup.py

2. Save the Python. In Internet Explorer use "File | Save As", in
Firefox use "File | Save Page As"

3. Run it from the command line (or possibly by double-clicking
it in an explorer window, never tried that)

You should now be able to run easy_install from the command line and
install packages from the usual suspects.

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top