93 Replies
Not yet, we're working on native support, and you can upvote the GitHub ticket here: https://github.com/modularml/mojo/issues/510
We have instructions to set up a remote x86-64 environment here: https://developer.modular.com/download
And if you're on macOS with an x86 chip you can set up a docker container: https://github.com/modularml/mojo/blob/main/examples/docker/Dockerfile.mojosdk
GitHub
[Feature Request] Support for macOS · Issue #510 · modularml/mojo
Review Mojo's priorities I have read the roadmap and priorities and I believe this request falls within the priorities. What is your request? Tracking issue for supporting Mojo on macOS. Please...
GitHub
mojo/examples/docker/Dockerfile.mojosdk at main · modularml/mojo
The Mojo Programming Language. Contribute to modularml/mojo development by creating an account on GitHub.
Is it expected not to work even when using a Docker container built with
FROM --platform=linux/amd64 mcr.microsoft.com/devcontainers/base:ubuntu-22.04
?I am already running it in the remote x86_64 env, but it is not the same you sure understand. It is good for testing Mojo itself apart from all my real life projects
@Julia that's right emulation through QEMU and Rosetta both don't work
Sure I could build API for communication with it, but who does have time for that when I have fulltime job
Upvoted
Definitely we understand how much the community wants native support!
When can we expect it for mac
Even a month (a named month) estimate would be greatly appreciated imo.
Even having support for ARM so we could run it with Docker would be great I think
is there a non-native version rn? pardon my misunderstanding but i thought just linux for now?
You can install into a remote container if on arm64, or use a docker container if on x86_64
Yes, please keep this Q&A about Mac M1/M2 support, thx.
I finally found some sane documentation on targeting Apple Neural Engine directly. https://github.com/eiln/ane/blob/main/docs/README.md
The most simple HelloWorld would be to use the ANE to make a memcopy()? Second would be hashing memory regions?
So cool!!
arm64
🧙Soon as In sometime in the next week or two or soon as in like a month or two?
Follow #mojo-announcements
still waiting
At 19th October 😁
Tomorrow's the day
Yessss .. finally :mojo:
Less goo!
🥳
Congrats @Lcross🦠, you just advanced to level 1!
https://docs.modular.com/mojo/changelog.html
The Mojo SDK now works on macOS (Apple silicon). This is the same version previously released for Linux. Get the latest version of the SDK for your Mac system:
Modular Docs - Mojo🔥 changelog
A history of significant Mojo changes.
Had to run the
curl
command twice, the first time it failed with an auth issue. That said, good choice using brew
for the macos sdk. Downloading artifacts now... :mojo:Wooooooo
Only Apple Silicon? It doesn't support Intel?
That’s what I was thinking 😕.
@Melody Daniel only Apple Silicon at the moment yeah, you can use docker on Intel Macs for now
It's working here on Silicon! Needed to run as lower case
modular auth [auth_code]
after curl & setting path and before installing mojoIt is stuck on downloading artifcats
Congrats @𝐍𝐚𝐩𝐢𝐞𝐫, you just advanced to level 3!
can you give me the exact command? My apple silicon says it is not arm64
tried
"curl https://get.modular.com | \
MODULARAUTH=mut \
sh -"
and
"brew update
brew install modularml/packages/modular"
and it fails
Very very disappointed that only Apple silicon is supported! Huge letdown
@aespeiuk is it in x86_64?
mine is apple silicon arm64. but says it is not while trying to install
I have just issued the curl command and brew commands were automatic then the export MODULAR_HOME and export PATH commands followed by modular auth [same code as the curl] and modular install mojo
I'm on zsh brew which is by default on Apple silicon m series
Congrats @aespeiuk, you just advanced to level 1!
My brew is 4.1.16 if it helps
trying to follow this
I was on developer.modular.com/download and did the right hand side
It's slightly different
here is the output
tried manual and the right pane steps and fails
I just think you might have brew for x86_64
You can have two brews but I have two condas instead
For anyone else hitting above issue saying
the arm64 architecture is required
but you're on Apple Silicon:
On whatever terminal you're using, right click and press Get Info
then untick Open using Rosetta
:I am getting this error after Installing the Modular CLI modular: error: please run
modular auth
before attempting to install a package@fishie22 run the command with your auth key after it on: https://developer.modular.com/download
command not found mojo????
Run the steps up the top here: https://docs.modular.com/mojo/manual/get-started/hello-world.html
Put it in your
~/.zshrc
fileI successfully installed the CLI using the auth key. Step 3 raises an error. Maybe a dumb question: do I not need step 3 or do I need the auth key again.
run
modular auth <your-auth-key-here>
first
and then run modular install mojo
run:
If you are using ZSH, run the following commands:
echo 'export MODULAR_HOME="/{youpath}/.modular"' >> ~/.zshrc
echo 'export PATH="/Users/{youpath}/.modular/pkg/packages.modular.com_mojo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
is it bash used normally?
macos switched to ZSH by default a few releases ago.
Congrats @haungmickey#000, you just advanced to level 1!
@aespeiuk this is unrelated to macOS so I just created a thread here for you: https://discord.com/channels/1087530497313357884/1164597826228076678/1164597826228076678
When I try to install on my M1 I get this error:
anyone else have anything similar?
On Terminal.app in /Applications, when I right click and press Get Info
Open using Rosetta
is already unticked. So I have raised an issue on Github.Still getting::
modular: The arm64 architecture is required for this software.
Error: modular: An unsatisfied requirement failed this build.
But Rosetta is turned off
Hi @Alexander van der Werff likely due to having intel based homebrew, see the ticket here to fix: https://github.com/modularml/mojo/issues/1078
GitHub
[Modular CLI]: Mac M1 homebrew installation fails with "The arm64 a...
Issue description I try to install the modular CLI as described in the blog: https://www.modular.com/blog/mojo-is-now-available-on-mac However, it fails with "The arm64 architecture is require...
Hi Jack, thanks, I was just reading the same on github and was about to try to uninstall and reinstall brew.
@Jack Clayton is it required to have the command line tools for Xcode 14.3? I have Xcode 15.0.1. The first step now fails with:
Error: Your Command Line Tools are too outdated.
I have Xcode 15.0.1 on Ventura 13.6
That can happen for a number of reasons but typically if something is in the middle of your connection between the client and server. Like if your network environment has a reverse proxy or some firewall setups or a captive portal for WiFi setups, etc.
ohhh ok i think ik what it is.
@Alexander van der Werff can you try running
brew doctor
Yes did it, I see it prints Warnings:
Warning: Your Command Line Tools are too outdated.
Update them from Software Update in System Settings.
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 14.3.
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Settings.
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 14.3.
..and some more, but I should have the Command Line Tools for Xcode 15.0.1
and brew config shows:
CLT: 12.0.0.32.27
Xcode: 15.0.1
Rosetta 2: false
Oh yeah, I don't even have Xcode installed, maybe try uninstalling it:
You can install everything you need for brew just with:
And then I just
brew install llvm
Right, I need Xcode though, but I see the CLT is pointing to the wrong version somehow
Have you tried uninstalling and reinstalling brew? That seems to be fixing a lot of problems for people
Would there be loss of performance if used docker instead of a system (brew) install on an Apple silicon Mac? Not sure if this is the right place to ask.
yes I did, I had the intel version (because of previous mac), so following https://github.com/modularml/mojo/issues/1078 fixed it partly, now I need to see why brew is pointing to CLT 12.0 while I have xcode 15 installed on my machine.. probably some old left over
GitHub
[Modular CLI]: Mac M1 homebrew installation fails with "The arm64 a...
Issue description I try to install the modular CLI as described in the blog: https://www.modular.com/blog/mojo-is-now-available-on-mac However, it fails with "The arm64 architecture is require...
Congrats @Alexander van der Werff, you just advanced to level 1!
my vscode extension was not working on mac. However it got fixed when I created a new vscode workspace and reinstalled the extension
still facing this , but the network has no proxy or anything , even connected with my phones hotspot
It gives all kind of issues like network and so on, where it is actually a different issue. I had a very tough time with the installation as rosetta was enabled in the options for Terminal app inside applications folder. Then I had to delete brew as it was under users and re-did it under opt. Have you tried disabling rosetta?
Congrats @aespeiuk, you just advanced to level 3!
@Jack Clayton removing the CLT (sudo rm -rf /Library/Developer/CommandLineTools) and xcode-select --install did the trick
Awesome thanks heaps for letting me know, glad it’s working for you
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.
To be precise, the following line in my modular.cfg
file defines the location of the Python library within your Conda environment:
It appears to be indeed the correct library path within the pymojo
Conda environment:
Now, when I import the python lib from Mojo's REPL this is the error I get:
Do yo have any ideas of what might be the issue?
(Interestingly when I installed Numpy on the default Python installation it worked just fine. This issue seems to be related to Conda envs)hi, I'm completely new to mojo, just installed it on a mac laptop and I'm trying to go through tutorials.
Trying to go through the matrix multiplication example but when I try to import numpy I get this:
I'm not fully sure what's the relationship between mojo and my system python, but it seems to be importing numpy from the virtualenv.
I'm not fully sure what's the relationship between mojo and my system python, but it seems to be importing numpy from the virtualenv.I have the same/similar question: Can I choose/activate a particular python env for mojo to work with? I normally do this in my notebooks by selecting a python kernel, but since I need to select Mojo as my kernel, the relationship is no longer clear to me @JRX the solution recommended to me for python import problems (and it did work) was to just install miniconda. Not sure if that applies to your situation, but mojo seems to find python packages after install.
GitHub
[BUG]: Importing the numpy C-extensions failed. (Macbook Pro M1) · ...
Bug description Running the command mojo matmul.mojo results in the following error output: $ mojo matmul.mojo Unhandled exception caught during execution: IMPORTANT: PLEASE READ THIS FOR ADVICE ON...
I guess it makes sense, the trouble is that I already have
pyenv
installed on my system and it sounds like having both that and miniconda is asking for troubleI agree, I wasn't thrilled to add it, so up to you whether it's worth it. There also seems to be some detail in this post that I just found when I asked #mojo-bot-help - I'm going to give the a read, perhaps it will clear things up
Modular: Using Mojo🔥 with Python🐍
We are building a next-generation AI developer platform for the world. Read our latest post on how Using Mojo🔥 with Python🐍
I used exactly that guide to set up everything . Nonetheless when I try to import any Python libraries from Mojo's REPL I get:
@Gio can you try activating your conda environment, then put this in a
test.mojo
and run it:
And if you still get an error run:
I've tried to set up conda for myself and for python installed with conda mojo works. unfortunately for python from pyenv it doesnt 😢
ok, I managed to solve my problem. the issue comes from the fact that I had system python linked as
python_lib
in modular.cfg
but in runtime I was using libraries from pyenv python. After setting the right python_lib
mojo works well with pyenv python. I had to rebuild python with shared libraries thoughIs there a tutorial to help me integrate a mojo program within a native Mac app built with Swift?
This is very early days of the compiler, no bindings from mojo to swift nor Apple APIs, in future...
I was able to get some basic functionality in Jupyter