Module pymatmul not found

@aespeiuk can you try changing hello_interop.mojo to this and running it:
from python.python import Python


def main():
print("Hello Mojo 🔥!")
for x in range(9, 0, -3):
print(x)
try:
Python.add_to_path(".")
Python.add_to_path("./examples")
let sys = Python.import_module("sys")
for p in sys.path:
print(p)
let test_module = Python.import_module("simple_interop")
test_module.test_interop_func()
except e:
print(e, "could not find module simple_interop")
from python.python import Python


def main():
print("Hello Mojo 🔥!")
for x in range(9, 0, -3):
print(x)
try:
Python.add_to_path(".")
Python.add_to_path("./examples")
let sys = Python.import_module("sys")
for p in sys.path:
print(p)
let test_module = Python.import_module("simple_interop")
test_module.test_interop_func()
except e:
print(e, "could not find module simple_interop")
And show me the output thanks
17 Replies
aespeiuk
aespeiuk11mo ago
I created a file as I could not find any file by that name
No description
Jack Clayton
Jack Clayton11mo ago
@aespeiuk what happens when you do:
pwd -P
pwd -P
Thinking there might be a symbolic link causing problems
aespeiuk
aespeiuk11mo ago
No description
Jack Clayton
Jack Clayton11mo ago
can you show:
ls -lah
ls -lah
aespeiuk
aespeiuk11mo ago
yes
No description
aespeiuk
aespeiuk11mo ago
root dir
No description
Jack Clayton
Jack Clayton11mo ago
Yeah there's no simple_interop.py in there, do this:
cd ~/Documents/mojo
rm -rf mojo
git clone https://github.com/modularml/mojo
cd ~/Documents/mojo
rm -rf mojo
git clone https://github.com/modularml/mojo
Then try again
aespeiuk
aespeiuk11mo ago
deleted folder under Documents and tried git clone https://github.com/modularml/mojo again
GitHub
GitHub - modularml/mojo: The Mojo Programming Language
The Mojo Programming Language. Contribute to modularml/mojo development by creating an account on GitHub.
No description
aespeiuk
aespeiuk11mo ago
same issue
aespeiuk
aespeiuk11mo ago
this is the new folder downloaded
No description
Jack Clayton
Jack Clayton11mo ago
There's no .py files in there Put the files from here: https://github.com/modularml/mojo/tree/main/examples Ending in .py there manually
aespeiuk
aespeiuk11mo ago
I'm not sure why the .py files are not downloaded trying
aespeiuk
aespeiuk11mo ago
it worked
No description
aespeiuk
aespeiuk11mo ago
Some issue related to the github! @Jack Clayton thanks again !
amrsanders
amrsanders11mo ago
Its so wierd why the .py files didn't download. I had the same issue... I'm not sure if this is relevant but when I "cd"-ed into mojo/examples, the git info shown to me was this: It was shown to me like that right after cloning.
No description
Want results from more Discord servers?
Add your server