Frankie Ribery
Frankie Ribery

Reputation: 12153

Is there an automated way to install python modules (à la rubygems)?

I'm new to python. Are there alternatives to downloading a tarball for a python module & installing it via python setup install ? Anything like rubygems?

UPDATE I'm surprised that there are so many solutions for this one problem.

Upvotes: 1

Views: 1566

Answers (5)

DominiCane
DominiCane

Reputation: 1303

Pip is great:

$ pip install some_python_module
$ pip freeze > requirements.txt
$ cat requirements.txt

Output from freeze:

Creoleparser==0.7.3
Django==1.3
Genshi==0.6
PIL==1.1.7
South==0.7.3
django-debug-toolbar==0.8.5
....

After this in any other place:

$ pip install < requirements.txt

Upvotes: 1

dheerosaur
dheerosaur

Reputation: 15172

easy_install or pip. I also recommend checking out virtualenv to isolate environments for test running packages. The Python Package Index(pypi, also called Cheeseshop) is the official third-party software repository for Python.

Upvotes: 1

sateesh
sateesh

Reputation: 28673

Checkout pip

Upvotes: 0

Tomasz Elendt
Tomasz Elendt

Reputation: 1475

There are many options - you can stick with your system's default packaging system (if it has one) or you can pick one (or more) of existing Python tools like easy_install, zc.buildout or pip. I would recommend you to use Distribute together with pip.

Upvotes: 2

Simon Whitaker
Simon Whitaker

Reputation: 20566

setuptools is one option. Install that and then you can install many Python modules using the easy_install command-line tool.

Upvotes: 4

Related Questions