简体   繁体   中英

I import Python modules in Xcode 13 using PythonKit,Python-iOS and crashed

I import python-ios(Visit https://github.com/kewlbear/Python-iOS.git ) and PythonKit(Visit https://github.com/pvieito/PythonKit.git ) via swift package,ython-iOS library Python library updated to 3.9,and when I import model by Python,it crashed.the crashed info is :

PythonKit/Python.swift:674: Fatal error: 'try!' expression unexpectedly raised an error: Python exception: No module named 'open3d.cpu.pybind'
Traceback:
  File "/Users/Library/Developer/CoreSimulator/Devices/8981AD26-F5DE-42CA-B2C6-A80613FC29DA/data/Containers/Bundle/Application/C8C71F7A-3F48-41AC-88BE-4653988FD6CB/Measure.app/Open3D-iOS_Open3DSupport.bundle/site-packages/open3d/__init__.py", line 75, in <module>
    from open3d.cpu.pybind import (camera, geometry, io, pipelines, utility)

2021-11-08 17:45:33.458308+0800 Measure[15455:1251548] PythonKit/Python.swift:674: Fatal error: 'try!' expression unexpectedly raised an error: Python exception: No module named 'open3d.cpu.pybind'
Traceback:
  File "/Users/Library/Developer/CoreSimulator/Devices/8981AD26-F5DE-42CA-B2C6-A80613FC29DA/data/Containers/Bundle/Application/C8C71F7A-3F48-41AC-88BE-4653988FD6CB/Measure.app/Open3D-iOS_Open3DSupport.bundle/site-packages/open3d/__init__.py", line 75, in <module>
    from open3d.cpu.pybind import (camera, geometry, io, pipelines, utility)

It seems you are trying to run on simulator. I think that only Mac is supported.

Try creating a new project targeting Mac and then attempt again to see if it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM