Reputation: 31
While I am installing pycairo using easy_install on osx, there is an error message as following:
Searching for pycairo
Reading http://pypi.python.org/simple/pycairo/
Reading http://cairographics.org/pycairo
Best match: pycairo 1.10.0
Downloading http://cairographics.org/releases/pycairo-1.10.0.tar.bz2
Processing pycairo-1.10.0.tar.bz2
error: Couldn't find a setup script in /tmp/easy_install-hnheQI/pycairo-1.10.0.tar.bz2
Please help me out. Thanks in advance.
Upvotes: 1
Views: 1441
Reputation: 366003
It looks like pycairo is not set up to be easy_install
able (or pip
able).
The first problem is that the PyPI package pycairo points at the Python 3.x version, not the 2.x version (which is called py2cairo) This means you can't easy_install
or pip install
it for 2.x. And they don't have a separate py2cairo PyPI package. So, you'd have to explicitly easy_install http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2
.
The second problem is that the tarball isn't designed to be built with setuptools
; you have to use waf
.
So, you're going to have to download the link above (or, better, the latest py2cairo at http://cairographics.org/pycairo/), untar it, and read and follow the INSTALL directions.
This also assumes that you already have Cairo installed properly (e.g., via Homebrew).
PS, not that it would make any difference here, but you really should be using pip
instead of easy_install
. The only times you want to use easy_install
are to install pip
itself (sudo easy_install pip
), and to install two or three packages that are easy_install
able but not pip
able.
You mentioned that you got Cairo through MacPorts. MacPorts doesn't play well with non-MacPorts. In fact, that's kind of the point: to have a completely isolated set of tools and libraries that can be maintained together. This means if you have MacPorts' cairo
, you probably want its py27-cairo
, and python27
package.
If you want something better integrated with your system, either look for binaries, use Homebrew, or build it yourself. (I noticed that Homebrew also has a formula for py2cairo
, which I believe will install into your system 2.7 Python, but I haven't tested it. Normally, Homebrew doesn't supply Python/Ruby/Perl modules, because you've already got pip
/gem
/cpan
, but they make exceptions for packages that don't work with the standard tools and/or are hard to set up.)
Upvotes: 1