Arch-Linux

Arch linux:Cura thows:ValueError:PyCapsule_GetPointer 以不正確的名稱呼叫

  • October 5, 2021

當我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 包,但錯誤仍然存在。

謝謝你的幫助

最簡單的解決方案是解除安裝帶有依賴項的cura:

sudo pacman -Rns cura

並再次安裝:

sudo pacman -S cura

您是否嘗試過從 master 建構 pynest2d?它對我有用:

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

引用自:https://unix.stackexchange.com/questions/663472