Skip to content

Importing Modules #2

Closed
Closed
@ramondebruyn

Description

@ramondebruyn

Hi again!

I've been experimenting the current implementation some when I try to import specific modules I get the following error:

Fatal error: 'try!' expression unexpectedly raised an error: Python exception: No module named 'numpy': file PythonKit/Python.swift, line 674
2021-02-28 22:10:32.622406-0500 PythonPlayground[76992:6218680] Fatal error: 'try!' expression unexpectedly raised an error: Python exception: No module named 'numpy': file PythonKit/Python.swift, line 674
(lldb)

This error resulted adding this line below line 41 of the ContentView file (let sys = Python.import("sys"):
let np = Python.import("numpy")

Do I need to need to have the modules pre-installed in a specific location (on my hard drive or in the app bundle) for me to be able to import them, and how would I go about doing that?

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions