Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the recommended way of installing python packages on Arch? Searching for them on the AUR and installing them from there (or create a PKGBUILD file to make a package yourself) or using pip?

I started off by installing stuff from pacman and the AUR and dont know if it would be wise to mix with pip packages.

share|improve this question

migrated from serverfault.com May 19 '13 at 19:12

This question came from our site for system and network administrators.

Which python packages you want are not present in the official repositories? – Nicolas May 19 '13 at 17:17
up vote 4 down vote accepted

Typically, in a distribution, it's recommended that you use the distribution's package manager. You can of course install things using pip (or, in the perl world, cpan), or compile and install things yourself. However, when you do this, the distribution's package manager doesn't know about them and can't manage dependencies or updates for them.

Using pip is pretty much equivalent to compiling and installing your own package. Do it if you need to, but prefer the distribution's package manager.

share|improve this answer
You should absolutely avoid using pip (at least globally via sudo or as root) - I just got quite some site-package/... already exists errors when pacman tried to install some dependencies – Tobias Kienzler Oct 12 '15 at 16:55

If you don't need the python packages for all users then you can install them in your home using pip install --user packagename. Installing in your home will not conflict with the package manager.

See the pip manual for more information.

share|improve this answer
IMHO, this, together with a pointer to setting up virtualenvs, should be the accepted answer. – ttsiodras Jul 18 at 9:05

For certain packages (ones that I most probably don't want to hack), I make my own package using this:


then build and install the PKGBUILD produced.

I leave virtualenvs for packages I might want to modify or hack.

share|improve this answer

In addition to the other answers here, check out the python-virtualenv package. It might be very useful if you are doing development on several projects with different dependencies with mismatching version numbers.


Also beware that there are two variants of pip and virtualenv. One for Python 2 and one for Python 3. If installation fails with a syntax error, you might be trying with the wrong version.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.