Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

No module named cairo even though cairo is already installed- Mac

I’ve been trying to run a text-to-handwriting ai called "My Text in Your Handwriting" on my intel Mac. https://github.com/thaines/helit/tree/master/handwriting

Going through the install process and ran into a problem

Traceback (most recent call last):
  File "image_viewer.py", line 17, in <module>
    from viewer import *
  File "/*My home Folder*/helit/utils_gui/viewer.py", line 15, in <module>
    import cairo
ImportError: No module named cairo

I have ran into several of these kinds of problems with a missing module, but I have usually just installed the required modules with brew install *module* however, when I try brew install cairo it just tells me that it’s already installed.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I have ran into several of these kinds of problems with a missing module, but I have usually just installed the required modules with brew install *module* however, when I try brew install cairo it just tells me that it’s already installed. Do I not have the right version for this certain app? Am I missing something? I will admit I am very new to having to manually install python dependencies. I’m used to just installing with one command. Let me know what you think, and thanks for your time.

>Solution :

That’s missing a Python module; those aren’t provided by Homebrew’s brew.

import cairo would be provided by Pycairo, so (with a virtualenv activated for your project) try pip install pycairo to install that module.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading