我已经在网站上关注bezier
PyPi documentation,尽管我已经安装了该模块,但仍然收到此错误消息。我在Mac OS Catalina上运行该程序,而python版本是Python 3.7.4
代码如下:
import numpy as np
import bezier
nodes1 = np.asfortranarray([
[0.0, 0.5, 1.0],
[0.0, 1.0, 0.0]])
curve1 = bezier.Curve(nodes1, degree=2)
这是错误:
Traceback (most recent call last):
File "bezier_2.py", line 2, in <module>
import bezier
File "/bezier/bezier.py", line 10, in <module>
curve1 = bezier.Curve(nodes1, degree=2)
AttributeError: module 'bezier' has no attribute 'Curve'