copplestone
copplestone

Reputation: 79

Not finding python3 when installing pycairo

I'm trying to install pycairo. I downloaded the pycairo-1.10.0 folder and am trying to follow instructions. I have python3.5 installed in the location shown at the bottom of the screen shot screenshot, but when running config, it doesn't find it.

I'm running OS X Yosemite 10.10.5.

Install Procedure

$ ./waf --help    

$ ./waf configure  ( use --prefix and --libdir if necessary, --prefix=/usr --libdir=/usr/lib64  for Fedora 64-bit)

$ ./waf build
$ ./waf install

Use

$ python3 ./waf ...
if you have python2 and python3 installed, and the default is python 2.

Upvotes: 1

Views: 1693

Answers (2)

Daniel
Daniel

Reputation: 1110

Why not just use pip? In pip documentation may be solution to your problem.

On Linux, Mac OS X:

python2   -m pip install SomePackage  # default Python 2
python2.7 -m pip install SomePackage  # specifically Python 2.7
python3   -m pip install SomePackage  # default Python 3
python3.4 -m pip install SomePackage  # specifically Python 3.4
python3.5 -m pip install SomePackage  # specifically Python 3.5

On Windows:

py -2   -m pip install SomePackage  # default Python 2
py -2.7 -m pip install SomePackage  # specifically Python 2.7
py -3   -m pip install SomePackage  # default Python 3
py -3.4 -m pip install SomePackage  # specifically Python 3.4

Upvotes: 1

Roland Smith
Roland Smith

Reputation: 43495

Pycairo uses an ancient version of the waf build tool. You will need to patch the waflib/Build.py file in pycairo to make it work with Python 3.5.

Below is the fix as applied to the FreeBSD ports tree:

--- a/waflib/Build.py
+++ b/waflib/Build.py
@@ -151,6 +151,7 @@ class BuildContext(Context.Context):
                                f.close()
                self.init_dirs()
        def store(self):
+               return
                data={}
                for x in SAVED_ATTRS:
                        data[x]=getattr(self,x)

Upvotes: 0

Related Questions