Python 3.6 can find cairo libs but not Python 2.7
darcy at VybeNetworks.com
Fri Jul 13 06:18:29 EDT 2018
On 2018-07-12 04:17 PM, Terry Reedy wrote:
> On 7/12/2018 3:52 PM, D'Arcy Cain wrote:
>> $ python2.7 -c "import ctypes.util;
>> $ python3.6 -c "import ctypes.util;
>> I have the 3.6 version of py-cairo installed. Any thoughts?
>> NetBSD 7.1.2
> what is sys.path? Where in py-cairo installed?
For 3.6 it includes '/usr/pkg/lib/python3.6/site-packages' and for 2.7
it includes '/usr/pkg/lib/python2.7/site-packages'. The py-cairo files
are in the 3.6 site-packages. There are no Cairo files in the 2.7
I'm not sure why that matters though. It's the system libraries that it
can't find unless having py-cairo installed is somehow blocking the
search for the libraries.
Of course, my actual use depends on a cairo package. In fact, the
failure that led me to the above issue happens when I load cairocffi.
$ python3.6 -c "import cairocffi"
Traceback (most recent call last):
File "<string>", line 1, in <module>
line 41, in <module>
cairo = dlopen(ffi, 'cairo', 'cairo-2')
line 38, in dlopen
raise OSError("dlopen() failed to load a library: %s" % ' /
OSError: dlopen() failed to load a library: cairo / cairo-2
D'Arcy J.M. Cain
Vybe Networks Inc.
IM:darcy at Vex.Net VoIP: sip:darcy at VybeNetworks.com
More information about the Python-list