Arch linux:Cura thows:ValueError:使用不正确的名称调用 PyCapsule_GetPointer

Arch linux:Cura thows:ValueError:使用不正确的名称调用 PyCapsule_GetPointer

当我cura在终端上输入时,出现此错误并且程序无法启动:

john@arch-thinkpad ~> cura
/usr/lib/python3.9/site-packages/UM/PluginRegistry.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/usr/lib/python3.9/site-packages/UM/Settings/InstanceContainer.py:53: DeprecationWarning: invalid escape sequence \d
  version_regex = re.compile("\nversion ?= ?(\d+)")
/usr/lib/python3.9/site-packages/UM/Settings/InstanceContainer.py:55: DeprecationWarning: invalid escape sequence \w
  type_regex = re.compile("\ntype ?= ?(\w+)")
/usr/lib/python3.9/site-packages/UM/VersionUpgradeManager.py:98: DeprecationWarning: invalid escape sequence \.
  ".*\.lock",       # Don't upgrade the configuration file lock. It's not persistent.
Error in sys.excepthook:
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/cura/CuraApplication.py", line 57, in <module>
    from cura.Arranging.ArrangeObjectsJob import ArrangeObjectsJob
  File "/usr/lib/python3.9/site-packages/cura/Arranging/ArrangeObjectsJob.py", line 11, in <module>
    from cura.Arranging.Nest2DArrange import arrange
  File "/usr/lib/python3.9/site-packages/cura/Arranging/Nest2DArrange.py", line 5, in <module>
    from pynest2d import Point, Box, Item, NfpConfig, nest
ValueError: PyCapsule_GetPointer called with incorrect name

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/cura", line 187, in <module>
    from cura.CuraApplication import CuraApplication
  File "/usr/lib/python3.9/site-packages/cura/CuraApplication.py", line 57, in <module>
    from cura.Arranging.ArrangeObjectsJob import ArrangeObjectsJob
  File "/usr/lib/python3.9/site-packages/cura/Arranging/ArrangeObjectsJob.py", line 11, in <module>
    from cura.Arranging.Nest2DArrange import arrange
  File "/usr/lib/python3.9/site-packages/cura/Arranging/Nest2DArrange.py", line 5, in <module>
    from pynest2d import Point, Box, Item, NfpConfig, nest
ValueError: PyCapsule_GetPointer called with incorrect name

我能做什么来解决这个问题?我已经尝试更新所有 pip 软件包,但错误仍然存​​在。

谢谢你的帮助

答案1

您是否尝试过从 master 构建 pynest2d ?它对我有用:

git clone https://github.com/Ultimaker/pynest2d
cd pynest2d
mkdir build && cd build
cmake ../
make
sudo make install

答案2

最简单的解决方案是卸载 cura 及其依赖项:

sudo pacman -Rns cura

并再次安装:

sudo pacman -S cura

相关内容