2

I'd like to install python-pythonmagick package http://packages.debian.org/squeeze/python-pythonmagick

but when I run pip install or easy_install python-pythonmagick, it fails to find the package.

I guess I can add a url to /etc/apt/sources.list
What's the url that I want to add to this file?

eugene
  • 39,839
  • 68
  • 255
  • 489

2 Answers2

10

That is a Python package that is maintained by the Debian repo. You can install it with the Debian package manager:

sudo apt-get install python-pythonmagick

or

sudo aptitude install python-pythonmagick

However, I would prefer to stick with pip (with virtualenv) and use either of the following instead:

→ pip search pythonmagick
PythonMagickWand          - Python wrapper for the ImageMagick wand API
PythonMagick              - Wrapper around GraphicsMagick

→ pip search pgmagick
pgmagick                  - Yet Another Python wrapper for GraphicsMagick

Note that you will need to install GraphicsMagick/ImageMagick itself with Debian's package manager separately if you are using pip. pgmagick/pythonmagick is just a Python wrapper for GraphicsMagick/ImageMagick.

More: pgmagick

K Z
  • 29,661
  • 8
  • 73
  • 78
  • wow more than what I asked for! Another question, I installed using apt-get install, and now it works sorta.. It runs outside of virtualenv but not in a virtual-env that I'm working on. How do I let a virtual-env know about something installed by apt-get? – eugene Dec 13 '12 at 07:32
  • 1
    I also tried installing apt-get installing ImageMagick/GraphicsMagick. then sudo pip install pythonmagick.. it says "could not find any downloads that satisfy the requirement pythonmagick'. Strange 'pip search pythonmagic' shows the pythonmagickwand and pythonmagick. – eugene Dec 13 '12 at 07:39
  • @Eugene I am afraid `pythonmagick` is no longer active: http://sxoop.wordpress.com/2006/11/29/whither-pythonmagick/ Though if you are using `ImageMagick` you can still `pip` install from the tarballs here: http://www.imagemagick.org/download/python/ . Though `pgmagick` seems to be the best option here. – K Z Dec 13 '12 at 07:49
  • @Eugene To answer your first question, `apt-get install` will not install the package to the `virtualenv` path. The only way I can think of to make it work with `virtualenv` is to copy the files that gets installed by `apt-get` (`/usr/lib/python2.7/dist-packages/pythonmagick*` for e.g. ) to your `virtualenv` path (`venv/lib/python2.7/site-packages/`. – K Z Dec 13 '12 at 08:06
0

This is what worked for me on running vagrant on ubuntu...

sudo yum install python-pythonmagick
whoopididoo
  • 411
  • 2
  • 10
  • 19