neozhaoliang / pywonderland

A tour in the wonderland of math with python.
MIT License
4.18k stars 346 forks source link

Error when runing e8.py #14

Closed xhtp2000 closed 6 years ago

xhtp2000 commented 6 years ago

---> 14 import cairocffi as cairo 15 import numpy as np 16 from palettable.colorbrewer.qualitative import Set1_8

C:\Localdata\Software\PythonAnaconda\lib\site-packages\cairocffi__init__.py in () 14 import ctypes.util 15 ---> 16 from . import constants 17 from .compat import FileNotFoundError 18 from ._ffi import ffi

ImportError: cannot import name constants

neozhaoliang commented 6 years ago

This seems because there are some conflictions in the version of the cffi module. I have met this problem when installing the numba module. I suggest you run it with python3+, or manully install the cairocffi via pip command

pip install cairocffi