小编Ala*_*hou的帖子

我无法使用 PythonKit 在 Xcode 11 中导入 Python 模块

我现在正在使用 Swift 包管理器。

使用它,我将 PythonKit 导入到我的 Swift 项目中。

我现在无法使用 PythonKit 导入 Python 模块。

它要求我设置 PYTHON_LIBRARY 路径,但我不知道该怎么做。

谁能帮我?

//
//  ViewController.swift
//  VideoStream
//
//  Created by HeRo Gold on 7/20/19.
//  Copyright © 2019 TopAce. All rights reserved.
//

import UIKit
import PythonKit

let sys = Python.import("sys")

class ViewController: UIViewController {

    @IBOutlet weak var netflixView: WKWebView!
    let netflixURL = URL(string: "https://www.netflix.com/login")

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.

        let pymsl = try Python.import(name: …
Run Code Online (Sandbox Code Playgroud)

python xcode ios swift

7
推荐指数
2
解决办法
3612
查看次数

标签 统计

ios ×1

python ×1

swift ×1

xcode ×1