python - 使用PythonKit快速调用Python

标签 python ios swift

我想用Swift调用Python,所以我下载了PythonKit并构建了它,但是得到了以下错误消息。如果我添加PythonKit依赖项,它将显示“Segmentation fault 11”。有人知道怎么解决吗?或者有其他方法可以用Swift调用Python?
https://github.com/pvieito/PythonKit
快跑
编译Swift模块“PythonKit”(4个来源)
/PythonKit master/PythonKit/Python.swift:82:2:错误:未知
属性“dynamicCallable”@dynamicCallable^
/PythonKit master/PythonKit/Python.swift:82:2:错误:未知
属性“dynamicCallable”@dynamicCallable^
/PythonKit master/PythonKit/Python.swift:128:26:警告:
“CustomPlaygroundQuickLookable”已弃用:
CustomPlaygroundQuickLookable将在将来的Swift中删除
版本。要自定义类型在操场中的显示方式,请使用
取而代之的是CustomPlaygroundDisplayConvertible。分机PythonObject:
CustomPlaygroundQuickLookable公司{
如果添加

.package(url: "https://github.com/pvieito/PythonKit.git", .branch("master"))

生成时显示“分段错误11”。

最佳答案

现在使用Swift 5.0就可以了!谢谢!

关于python - 使用PythonKit快速调用Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53694540/

相关文章:

python - Python 字典的计数问题

ios - 在 Swift 3 中选择 UITableView 单元格后将字符串设置为 var

ios - 雪碧包 : how to make newly spawned enemy ships shoot bullets at player?

ios - 卡片式集合ViewCell

ios - 全局向导航栏应用渐变并处理方向变化

python - 找不到 django.views.generic 。哪里通用。在所有文件夹中查找该文件

python - Pyinstaller QtCore Module导入报错

iOS:Coregraphics 图像质量差

Swift:在自动对焦时创建的搜索栏

python - 将文件读入二维列表