“ AttributeError:模块'bezier'没有属性'Curve'错误

时间:2020-03-26 15:27:50

标签: python python-3.x bezier

我已经在网站上关注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'

0 个答案:

没有答案