Issue with gpu puzzles that appears to be a MAX issue. Any help?

Note about the editor here: When I selected some text and clicked on the </> icon, the text was converted, but it did not stay selected, so I was unable to toggle.

I have an Ubuntu machine with a 4090. I want to get MAX/Mojo running on it. When I follow the instructions given to me at the Modular programming event, I end up with this error on the 15th mojo-gpu-puzzles example:

----- start of Linux output
toddb@fidfast mojo-gpu-puzzles % ./solutions/run.sh p15
=== Testing solutions in p15/ ===
=== Running p15/p15.py ===
Traceback (most recent call last):
 File "/home/toddb/Work/Modular/mojo-gpu-puzzles/solutions/p15/p15.py", line 4, in <module>
 from max.driver import CPU, Accelerator, Device, Tensor, accelerator_count
ModuleNotFoundError: No module named 'max'
Failed: p15/p15.py
----- end of Linux output

Thanks and have a productive week! :pizza::fire::brain:

From within the mojo-gpu-puzzles directory, it might be best to work within the Pixi environment to make sure you have the right packages available to Python. Try

pixi run ./solutions/run.sh p15

As Brad mentioned, please follow the README and the docs to use either pixi or uv which are the chosen dependency, environment and task managers.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.