Skip to content
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

Apple Silicon / ARM Support? #1487

Closed
mikeckennedy opened this issue Dec 17, 2021 · 20 comments
Closed

Apple Silicon / ARM Support? #1487

mikeckennedy opened this issue Dec 17, 2021 · 20 comments
Labels
platform: MacOS MacOS specific issue priority: high high priority state: duplicate This issue or pull request already exists type: build related to building

Comments

@mikeckennedy
Copy link

mikeckennedy commented Dec 17, 2021

Version of Dear PyGui

Version: 1.1.3
Operating System: macOS Monterey on Apple Silicon (M1 Max)

My Issue/Question

Cannot install dearpygui package with pip

To Reproduce

Steps to reproduce the behavior:

  1. On macOS Monterey on a M1 Max (probably any M1)
  2. Try to install dearpygui: pip install dearpygui

Expected behavior

DearPyGUI is installed

Actual behavior

Error:

(venv) ➜  pip install dearpygui
ERROR: Could not find a version that satisfies the requirement dearpygui (from versions: none)
ERROR: No matching distribution found for dearpygui
(venv) ➜  python -V
Python 3.10.1

Thoughts

I think this is because there is an x64 Intel macOS wheel but not an ARM64 macos wheel.

@mikeckennedy mikeckennedy added state: pending not addressed yet type: bug bug labels Dec 17, 2021
@hoffstadt
Copy link
Owner

Hi Mike, unfortunately you are correct. We do not have wheels for M1 yet as we haven’t been able to find a CI host with M1 runners. I imagine it will be some time before the runners are available. We plan on picking up an M1 Mac in the near future to build wheels manually (the same way we currently handle Raspberry Pi).

Some M1 users have built wheels locally using our build instructions here and changing the platform name however we haven’t been able to test personally on M1’s yet!

@hoffstadt hoffstadt added platform: MacOS MacOS specific issue priority: high high priority state: duplicate This issue or pull request already exists type: build related to building and removed state: pending not addressed yet type: bug bug labels Dec 17, 2021
@mikeckennedy
Copy link
Author

mikeckennedy commented Dec 17, 2021

Got it. Feel free to close this if it makes sense. I have an M1 mini and the super maxed out MBP 16 M1 Max. For anything other than video or really parallel work, they are basically the same speed for what it's worth. I don't even use my maxed MBP day-to-day actually. Only when I'm out because the mini feels like basically the same machine and has lots of ports and setup in the office.

Looks like there are some $500 M1 minis here if that helps:

https://www.apple.com/shop/refurbished/mac

But without an M1, this is tricky. Thanks for the tip.

@hoffstadt
Copy link
Owner

I appreciate the link! Didn’t know about that.

I may just pick one up this weekend. The number of M1 users interested in DPG has continued to grow, so I think it would make sense.

@mikeckennedy
Copy link
Author

You're welcome. 8 GB is a little tight but still works OK. Apple does seem committed to really moving to Apple Silicon. My experience is those platforms are almost magical. Love them. Anyway, I got DearPyGUI running on my M1 under Rosetta.

@mxidentic
Copy link

Hello, I tried to assemble the wheel according to the instructions but I get a lot of errors during the assembly. I installed all the dependencies, the only thing for me is not clear where to get the plat name. Can you help? I have a macbook pro m1
image

@hoffstadt
Copy link
Owner

@mxidentic I believe it should be: python3 -m setup bdist_wheel --plat-name macosx-11.0-arm64 --dist-dir dist. Updating the wiki accordingly. Let me know if it works.

I ordered an M1 in December and it should finally arrive this friday. So we should have some M1 wheels prebuild soon!

@mxidentic
Copy link

mxidentic commented Jan 19, 2022

@hoffstadt this is stupid but the wheel with the given plat name is not installed on my mac but if I use this plat name: macosx-10.9-x86_64 then it is installed and even somehow works but there are problems with viewport rendering

When assembling, a million errors also appear, in general, we are waiting for the wheels from you!

My mac info:
image

Assembly process:
image

Wheel installation:
image

some info at the end of a build:

image

@yig
Copy link

yig commented Jan 20, 2022

Running pip install git+https://github.com/hoffstadt/DearPyGui@v1.3 on Apple Silicon produces:

Successfully built dearpygui
Installing collected packages: dearpygui
Successfully installed dearpygui-1.3

However, import dearpygui in python results in:

Python 3.9.9 (main, Nov 21 2021, 03:16:13) 
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dearpygui
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/yotam/isol/dearpygui.py", line 1, in <module>
    import dearpygui.dearpygui as dpg
ModuleNotFoundError: No module named 'dearpygui.dearpygui'; 'dearpygui' is not a package

Update after the wheel was uploaded and I saw the same issue. I put the test code in a file named dearpygui.py. This error was the result of the script I was running having the same name as the module. Oops.

@hoffstadt
Copy link
Owner

Actually just got an update on the M1 arrival… TOMORROW. So we should have wheels up this weekend!

@raymond-devries
Copy link

raymond-devries commented Jan 21, 2022

Just listened to the Talk Python to Me podcast about this project. Super sweet you'll have the wheels soon. Very excited to try it out.

@hoffstadt
Copy link
Owner

Yep! Here it is running on my new M1. Hoping to get the a wheel or 2 up by Sunday.

IMG_1750.MOV

@mikeckennedy
Copy link
Author

Love it!

@hoffstadt
Copy link
Owner

We've added 2 wheels for Apple Silicon. Python 3.8 & Python 3.9. We will continue to add more once we've automated the process a bit. We are having to manually build the wheels at the moment.

Also note, GLFW (the windowing library we use for Mac/Linux) will possibly show an error:

Glfw Error 65544: Cocoa: Failed to find service port for display

This is being address (because we are in the process of removing GLFW altogether).

@WMRamadan
Copy link

What is the current status on this, currently it is not working on:

OS: macOS 12.4
Python: 3.8.9
Architecture: arm64
DearPyGUI: 1.6.3

pip3 install dearpygui does not work, I had to build manually to get it working.

After successful installation I get the following error when I try to import the module:

ModuleNotFoundError: No module named 'dearpygui._dearpygui'

@blezzbeats
Copy link

+1

@hoffstadt
Copy link
Owner

Can you check with 1.7? We removed freetype from the macOS builds.

@blezzbeats
Copy link

blezzbeats commented Oct 11, 2022 via email

@hoffstadt
Copy link
Owner

@blezzbeats, I can't seem to reproduce it. Any details on your machine?

@mef51
Copy link
Contributor

mef51 commented May 22, 2023

I'm trying to build v0.6.415 of dearpygui for M2 silicon (ventura 13.3) but I haven't been able to with the above instructions. I'm able to generate a wheel but there doesnt seem to be any scripts or binaries associated with it when I install. Only the .dist-info gets installed.

I know this may be a stretch but any suggestions? The build process was different back then.

Thanks

@mef51
Copy link
Contributor

mef51 commented May 25, 2023

If anyone else needs it: this is how I built v0.6.415 on the macbook air M2 silicon with python 3.11, and macos ventura 13.3.

After the wiki instructions (ie. with the repo cloned recursively and cmake and xcode installed) and python installed via brew run python3-config --include to see where your python headers are. For me this was /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11

I added this path to DearPyGui/cmake/dpg_sources.cmake under the MARVEL_INCLUDE_DIR variable.
In mac_runner.cmake in the same directory I had to add a corresponding branch for my python version (3.11)

setup.py didn't have the cmake commands in 0.6.415 but they are in appveyor.yml so I followed those.
From the root of the repo, I did:

mkdir cmake-build-release
cd cmake-build-release
cmake .. -DMVDIST_ONLE=True -DMVPY_VERSION=3.11 -DMVDPG_VERSION=0.6.415
cd ..
cmake --build cmake-build-release --config Release

If no errors you can then do

cd Distribution
python BuildPythonWheel.py ../cmake-build-release/DearPyGui/core.so 0.6.415
python -m setup bdist_wheel --plat-name macosx-11.0-arm64 --dist-dir dist
pip install --user dist/dearpygui-0.6.415-cp311-cp311-macosx_11_0_arm64.whl

et voila. Note that using --plat-name macosx-13.3-arm64 didn't work

Processing ./dist/dearpygui-0.6.415-cp311-cp311-macosx_11_0_arm64.whl
Installing collected packages: dearpygui
Successfully installed dearpygui-0.6.415

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: MacOS MacOS specific issue priority: high high priority state: duplicate This issue or pull request already exists type: build related to building
Projects
None yet
Development

No branches or pull requests

8 participants