【问题标题】:Run Menpo and Menpofit with PyCharm使用 PyCharm 运行 Menpo 和 Menpofit
【发布时间】:2015-05-26 16:06:12
【问题描述】:

我尝试使用 PyCharm IDE 探索 Menpo 和 Menpofit。我已经安装了所需的软件包,但我遇到了一些问题:

  1. 从 .fastpwa 导入 CLookupPWA; ImportError: 无法导入名称“CLookupPWA”
  2. 从.normals 导入compute_normals; ImportError:没有名为“menpo.shape.mesh.normals”的模块

那么如何使用 PyCharm 运行 Menpo 和 Menpofit?

【问题讨论】:

    标签: python pycharm packages menpo


    【解决方案1】:

    您是如何安装所需的软件包的?使用conda 指令,还是通过pip

    您看到的错误是因为 CLookupPWAcompute_normals 是编译的 Python 扩展,需要在加载包之前构建。最简单的方法是在 Menpo 顶层使用 make 命令,该命令运行 python setup.py build_ext --inplace

    如果您使用的是 Windows,事情开始变得非常棘手,因为您需要能够正确编译代码。请查看说明here,它试图解释如何正确设置 Visual Studio 2008。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-01
      • 2017-07-07
      • 2020-07-22
      • 1970-01-01
      • 2013-12-13
      • 2021-09-28
      • 2018-01-08
      相关资源
      最近更新 更多