【发布时间】:2013-11-10 04:49:25
【问题描述】:
在我看来,CGAL 文档没有得到很好的记录。我完全不知道如何在 Python 中使用他们的包。
我已经在我的 Windows 上安装了CGAL-4.3,我尝试这样做
In [233]: """ python 2.4"""
.....: from CGAL.Alpha_shapes_2 import *
.....: from CGAL.Triangulations_2 import Delaunay_triangulation_2
.....: from CGAL.Kernel import *
.....: from ShapeHelper import *
.....: import numpy as np
.....: import sys
错误信息说
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-233-4807de38949d> in <module>()
1 """ python 2.4"""
----> 2 from CGAL.Alpha_shapes_2 import *
3 from CGAL.Triangulations_2 import Delaunay_triangulation_2
4 from CGAL.Kernel import *
5 from ShapeHelper import *
ImportError: No module named CGAL.Alpha_shapes_2
我应该怎么做才能正确导入这些模块?
在我可以导入它们之后,就像在 python 中使用任何其他模块一样简单。
【问题讨论】:
-
您是否已将
cgal-python添加到您的 PYTHONPATH 中? -
@tijko 是的,奇怪的是 ImportError: No module named Kernel
-
不,我认为是这个特殊的包。你能帮忙检查一下吗?我怀疑里面少了点什么。 gforge.inria.fr/frs/shownotes.php?release_id=3674
-
@tijko 如果您可以尝试将其导入您的python,那就太好了。我认为它也行不通...
-
你用的是什么windows版本?