Gio
Gio
MModular
Created by Jack Clayton on 9/8/2023 in #questions
Native apple silicon macOS m1 and m2 support
I used exactly that guide to set up everything . Nonetheless when I try to import any Python libraries from Mojo's REPL I get:
Execution interrupted. Enter code to recover and continue.
Enter LLDB commands to investigate (type :help for assistance.)
4> let sys = Python.import_module("sys")
(PythonObject) sys = {
(PyObjectPtr) py_object = <parent is NULL>

}
Execution interrupted. Enter code to recover and continue.
Enter LLDB commands to investigate (type :help for assistance.)
4> let sys = Python.import_module("sys")
(PythonObject) sys = {
(PyObjectPtr) py_object = <parent is NULL>

}
110 replies
MModular
Created by Jack Clayton on 9/8/2023 in #questions
Native apple silicon macOS m1 and m2 support
(Interestingly when I installed Numpy on the default Python installation it worked just fine. This issue seems to be related to Conda envs)
110 replies
MModular
Created by Jack Clayton on 9/8/2023 in #questions
Native apple silicon macOS m1 and m2 support
Do yo have any ideas of what might be the issue?
110 replies
MModular
Created by Jack Clayton on 9/8/2023 in #questions
Native apple silicon macOS m1 and m2 support
Now, when I import the python lib from Mojo's REPL this is the error I get:
2> from python import Python
3> let sys = Python.import_module("sys")
4.
(PythonObject) sys = {
(PyObjectPtr) py_object = <parent is NULL>
}
Execution interrupted. Enter code to recover and continue.
Enter LLDB commands to investigate (type :help for assistance).
2> from python import Python
3> let sys = Python.import_module("sys")
4.
(PythonObject) sys = {
(PyObjectPtr) py_object = <parent is NULL>
}
Execution interrupted. Enter code to recover and continue.
Enter LLDB commands to investigate (type :help for assistance).
110 replies
MModular
Created by Jack Clayton on 9/8/2023 in #questions
Native apple silicon macOS m1 and m2 support
To be precise, the following line in my modular.cfg file defines the location of the Python library within your Conda environment:
python_lib = /Users/gio/opt/anaconda3/envs/pymojo/lib/libpython3.10.dylib
python_lib = /Users/gio/opt/anaconda3/envs/pymojo/lib/libpython3.10.dylib
It appears to be indeed the correct library path within the pymojo Conda environment:
(pymojo) ➜ ~ ls -ll /Users/gio/opt/anaconda3/envs/pymojo/lib/libpython3.10.dylib
-rwxrwxr-x 1 gio staff 3906684 Oct 22 13:53 /Users/gio/opt/anaconda3/envs/pymojo/lib/libpython3.10.dylib
(pymojo) ➜ ~ ls -ll /Users/gio/opt/anaconda3/envs/pymojo/lib/libpython3.10.dylib
-rwxrwxr-x 1 gio staff 3906684 Oct 22 13:53 /Users/gio/opt/anaconda3/envs/pymojo/lib/libpython3.10.dylib
110 replies
MModular
Created by Jack Clayton on 9/8/2023 in #questions
Native apple silicon macOS m1 and m2 support
I'm experiencing issues with getting Mojo to recognize the Python library in my Conda environment on my 13" MacBook M2. I have modified the modular.cfg file to include the path relative to the local Python library, as specified in the documentation. However, when I import "sys" from the Mojo REPL, it doesn't seem to read the Python library properly, leading to problems later on.
110 replies