-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'pip install mlx' does not seem to work correctly #10
Comments
I am finding the same issue. init.py is print("HELLO WORLD"). |
Can you try installing the latest version of mlx ( |
I did but that doesn't seem to work either |
What was the result of running |
Env:OS: macOS 14.1.1 23B81 arm64 |
Hmm, that's odd |
Package Version mlx 0.0.3
don't know why but for some reason it's not able to recognize the package M2 Pro |
Just another (positive) data point: I had no issue with
OS: macOS 13.5.2 |
This does not work either. @jagrit06 I tried installing it from source using
Maybe I should upgrade my python version for more support, but the above trace suggests that metal is not available, not sure why? |
Building from source requires that you have a working Xcode installation which provides the What is the output from running |
Hi! I have the same problem with python installed using
also the same problem with native python:
OS Version is:
|
I'm having the exact same problem in a newly created condo env. Update: I have succeeded in installing it and runing the stable diffusion example with the Mac system python. |
I upgraded pip and tried this (enc) (base) MacBook-Pro-4:stable_diffusion oliverks$ pip install -U mlx==0.0.3 My OS is |
I am having the same issue on a Macbook Air 2020 M1 with a fresh python 3.11 virtual environment. tried the following commands after upgrading pip as all of the above commands somehow downloads the v0.0.0. ProductName: macOS |
I encountered the same problem. I used
Here are some information about my machine and environment MacBook Air M2 with 24GB memory ProductName: macOS Python Version: 3.12.0 |
It looks like we don't have a wheel for python 12. So for now you can do:
We will add a wheel for python 12 ASAP |
Your solution works for me. Thanks! |
This seems to have worked for me |
I've created a new conda env and now i'm getting the following error message Python version: 3.10.13 |
I used pip3 wherever I saw pip and it worked perfectly. |
Can you also try using |
Nope still getting the same error |
@NilayGaitonde could you run:
It should show you what pip thinks your machine is compatible with. We're looking for something like:
|
When I run that command I get a bunch of co3x where x is between 2 and 8, and I see no mention of arm in any of the outputs. |
I was hitting this and then realized it was because my pyenv/python/pip were all running under rosetta. You can check this with:
If you get back If you're in deep with pyenv and pyenv-virtualenv I recommend setting a new |
y@u x[main*] $ python -c "import platform; print(platform.processor())"
arm As I learned, the problem on my side in OSX version, I'm still on Big Sur, but you have build only for 13.x and 14.x. |
OK great, that was a duh moment, my version was still x86. So I used python3.11 natively which is arm. I now see cp311-cp311-macosx_12_0_arm64 on the version, but it can't find mlx. I get (enc) (base) MacBook-Pro-4:mlx oliverks$ pip install mlx |
To summarize on how to install MLX currently using the PyPI packages:
If you meet those requirements and it still doesn't work, make sure you are using a native python. The output of: |
@oliverks your OS is below the supported versions. Your best bet is to update to macOS 13 or 14. |
My problem is fixed. I was running iTerm on rosetta and Homebrew and all the installed packages (including python versions) were all i386 versions. I now switched completely to arm builds and |
Hey!! yes the problem was fixed thank you! I guess I had the wrong conda architecture on my mac and so was getting |
This seems like something that should be mentioned in the readme/docs in BOLD.
|
Alternatively, including the xcode-select path also helps with this issue. |
The install docs are updated to include the issues brought up in this thread. I am going to close this for now, but feel free to reopen if there are new issues with installation. |
I'm currently running into this error when I'm trying to import mlx:
I followed the directions above and created a conda env using the arm arch. I followed the directions from this post. For some context, I'm running: Python version: 3.12.0 |
Not sure what's going on there. It looks like your environment might be a bit wonky though. I would try making a fresh conda environment. Make sure the below gives
Then Let me know if you figure out the problem and what it ended up being! |
Hmm very weird, it looks like it might have been a problem with VSCode. I was importing mlx on a jupyter notebook in VSCode and I was getting the above error I mentioned. I moved out of VSCode, and opened a notebook with the conda environment I initially created with an Update: I got it to work on VSCode by following @awni your steps to create a fresh env, thanks for the help :) |
I found an easy fix to this issue: if you see Just Download & install macOS 64-bit universal2 installer Once done, you should see Now try pip install mlx , it should work. |
Issue Description: I created a However, when I try to import Based on the error message, should I update my Mac OS version? Environment:
Python 3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:35:41)
[Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information. Error Message: >>> import mlx.core as mx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/cuinuan/miniconda3/envs/labelimg/lib/python3.9/site-packages/mlx/core.cpython-39-darwin.so, 0x0002): Symbol not found: _cblas_sgemm$NEWLAPACK
Referenced from: <C3D30763-555E-35AD-B21B-85F410FA8F82> /Users/cuinuan/miniconda3/envs/labelimg/lib/python3.9/site-packages/mlx/lib/libmlx.dylib (built for macOS 13.3 which is newer than running OS)
Expected in: <E6C2D470-8878-372D-B9DB-0EDCA1303272> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
>>> import mlx
>>> Other Information: python -c "import platform; print(platform.processor())"
arm |
I would update your OS and try a gain. We officially support OS 13.5 and higher. |
any solution for windows 11? Specs: |
Unfortunately not. Apple silicon is the primary focus. You could probably get things working on linux without much difficulty building from source. But beyond that, we are not supporting other platforms for the time being. |
I wonder why it couldn't work under osx Monterey (12.*) if PyTorch natively works under Osx Monterey (e.g. allows you to move nn.Module to nps device) ? |
python 3.11 is not working for me
|
Did you check this issue #200 ? Most likely you are running python via rosetta for x86:
Should print Check out the installation instructions for more troubleshooting tips |
Yep tried this, prints
Thanks! Will update this thread w/ the solution if i can get it working |
Make sure you are using the same python: python3.11 -c "import platform; print(platform.processor())" |
OK the issue was that I was on macOS 12 and mlx requires 13+. ✅ Working now after updating to macOS 14. Thanks @awni 🙏 |
I use |
Seems like the pip install does not install the correct package on my env
If you trace the installed package it gives
Environment:
M1 Mac Air + Miniconda
The text was updated successfully, but these errors were encountered: