简体   繁体   中英

PyCairo Pip Install in python 3.8 on windows 10 is failing

I know a lot of threads have been made about this but none of them have solved my problem. I'm trying to install Cairo through pip install. I am using the command prompt. Here's the error message:

C:\python38\Scripts>pip install cairo
ERROR: Could not find a version that satisfies the requirement cairo (from versions: none)
ERROR: No matching distribution found for cairo

I was reading the dev log on github for pycairo and it looks like it says it should work for python 3.8 and windows 10, I'm not sure what to do here. I saw one person solved this by running a VM of windows 7, I'm not sure how to do that or if it would work for my situation.

I really appreciate any help you can give me, thank you.

Try pycairo instead

pip install pycairo

Edit in response to comment:

I found a similar question . Does this help?

pycairo is only available as a .tar.gz on pypi, so only source code. Note that in order to compile it, you will need a C compiler and the cairo library pre installed in order to use

pip install pycairo

Alternatively however, you can also just download the correct wheel file for python 3.8 from this website which will make the installation much simpler. You will not need to compile code this way, simply do

pip install <whl file>

after downloading the right one (most likely pycairo‑1.19.0‑cp38‑cp38‑win_amd64.whl )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM