cairocffi_to_pycairo doesn't work in fedora
See original GitHub issueOn fedora (disclaimer: not usually a fedora user) - cairocffi_to_pycairo.py doesn’t seem to work
$ python -c 'from cairocffi_to_pycairo.py import *'
[devel@b1e68ff9c787 utils]$ python -c 'from cairocffi_to_pycairo.py import *'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "cairocffi_to_pycairo.py", line 8, in <module>
pycairo.PycairoContext_FromContext.restype = ctypes.c_void_p
File "/usr/lib64/python2.7/ctypes/__init__.py", line 373, in __getattr__
func = self.__getitem__(name)
File "/usr/lib64/python2.7/ctypes/__init__.py", line 378, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib64/python2.7/site-packages/cairo/_cairo.so: undefined symbol: PycairoContext_FromContext
I’ve made a Dockerfile that can repro the issue https://github.com/stuaxo/docker-fedora-cairocffi-bug run ./build.sh then ./run.sh
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
ERROR: Could not build wheels for pycairo, which is required ...
In my case I'm trying to install PyGObject in Fedora . ... and if it still doesn't work install a lower version and...
Read more >Getting Started — Pycairo documentation
Fedora : sudo dnf install cairo-devel pkg-config python3-devel ... To verify that the installation works run the following Python code: import cairo ...
Read more >Bug 707196 – pygobject depends on unmaintained software
It looks like cairocffi is in Fedora 18 and 19: ... This doesn't just work for cairo, because cairo does not use GObject...
Read more >Installing — Matplotlib 2.2.4 documentation
The following backends work out of the box: Agg, ps, pdf, ... Debian / Ubuntu: sudo apt-get install python3-matplotlib; Fedora: sudo dnf ...
Read more >When A Python Module (Cairo) Is Installed Successfully But ...
In addition to other dependencies this will install xcffib. Importing. The module to import is named cairocffi in order to coexist peacefully with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Here is some code implementing the pycairo->cairocffi conversion using only the public API: https://github.com/pygobject/pycairo/issues/59#issuecomment-316442034
Feel free to use it under the cairocffi license.
Hello, what’s the status on this? I’m having a similar issue:
PycairoContext_FromContextis not in the pycairo.sofile - any ideas? My guess is that those functions are not used inside pycairo and thus optimized out?