-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
vpype[all] can't be installed on Mac OSX on ARM based Macs (M1) #320
Comments
Yes, this is a pity and I hope it get fixed soon. The workarounds are:
Side note: my preferred python distrib being MacPort, I'll be tracking ARM availability here. |
FYI, I just got a new M1 Max MBP and I'm actively researching this issue. My current understanding is that the situation will take some time to fully normalise, but there may be ways to get this sorted "manually" in the mean time. I'll post here whenever I have such a method sorted out. WIP notes/pointers:
|
For what its worth, I am using miniforge which seems to have a good amount of M1 binaries in its channel, with the exception of PySide2. I too was able to build PySide6 from source and gave the WIP vpype pyside6 branch a try and was able to get almost everything to work. The view window opens but without a render in it. I also used the pyside6 version of vpype with vsketch with similar results. No render shows but I am able to modify parameters and save sketches. |
Indeed the issue with Qt6 is that QGLWidget has been removed in favour of a new QOpenGLWidget. The way external renderer/GL librairies (in this case, ModernGL) are interfaced is one of the main difference and more complicated than before. The current integration is currently broken, which is why the display is blank. This is something I'm looking at but in the mean time MacPort has made great progress with Qt5 on M1/Monterey (though issues remain), so PySide2 is still an option for me. |
Edit: updated required package list based on @abruto's feedback. I just managed to get everything running on Monterey/M1 using the following procedure TL;DR
Install/upgrade MacPorts If you don't have MacPorts installed, install it from here. You will need to install Xcode if you haven't already. If you had MacPorts previously installed, make sure its package database is up-to-date:
Install required packages
Create a virtual environment for vpype
Note the use of the full path for the python interpreter to ensure that the good one is actually used for the venv. Build PySide2 from source Checkout PySide2 source:
Build PySide2 and install it in your virtual environment. CAUTION: the
Install vpype
Check that the install was successful:
|
@abey79 how did you manage to install gcc11? |
@abruto It worked for me somehow. Do you get the same error as in this issue? |
yes, it is the same error. There doesn't seem to be a solution yet. |
Just to be sure, did you properly update MacPorts beforehand? If so, it might be worthwhile to chime in in that issue to give it some visibility. Side note: gcc11 is need to have a fortran compiler, which is in turn needed for scipy to build from source. I believe an ARM binary will soon be available for scipy. When this happens, gcc11 will no longer be necessary. |
@abruto which version of clang do you have currently installed? You can check with It's kind of weird because the gcc11 port is listed as needing clang-9 for build, but I don't have it installed. Instead, I have version 11, 12 and 13 installed. Since it appears to be related to a C-compiler, I wonder if you could work around it by uninstalling whatever old clang version you may have and install a more recent one instead. Quite the long shot, but it's all I have to offer... |
Yes, I did update MacPorts. This should not be the problem. I had clang-11 installed. |
Well I'm not sure what else to suggest then. The ARM scipy release is likely imminent (scipy/scipy#13409 (comment)). In the mean time, one work around is to |
@abruto You may try |
I started over with no ports installed. I noticed that it was not necessary to install after installing all these ports the build process looks ok but in the end it fails:
CMakeLists.txt is in the pyside-setup directory though |
It definitely makes sense to add clang-13 and cmake indeed (I had them installed too). I'm not sure about the error though. The triple-period ( |
@abey79 yes I did shorten the path for display. I did not realize this could be misleading. I don't know why but the submodule I think it would be a good idea to always write |
No worries, I was just trying to think of something.
Oh ok. Does that mean you could successfully build PySide2 now?
Yeah I've already updated the documentation. However it only shows with the `"latest" version of the doc. By default, the version linked to the last release shows up. It'll update when I get vpype 1.8 out. |
Yes, I could successfully build |
scipy 1.7.3 with arm binaries has been released yesterday 🎉 |
I tried this and got the same error. |
@jkenzer Can you provide a full error log? |
Of course. Sorry about that. I ran: pip install vpype error: ERROR: Cannot install vpype==1.4.0, vpype==1.5.0, vpype==1.5.1, vpype==1.6.0, vpype==1.7.0 and vpype==1.8.0 because these package versions have conflicting dependencies. The conflict is caused by: To fix this you could try to:
|
@jkenzer Your error is rather weird. Can you try installing in a fresh virtual environment? It looks like yours is in some strange shape. I just tried on my M1 mac with no issue. |
@abey79 Got it. I was actually missing geos which was causing Shapely not to install. I had to run: brew install geos Excited to get the full vpype[all] installed when the libraries have better support for M1. Thanks for your work! |
PySide2 is now available in MacPorts 🥳 I've put the updated installation instruction in the top comment and pinned this issue for visibility. |
I have homebrew on my Mac already installed. Both don't seem to get along very well. Any chance to get it up and running with |
@krummrey I'm assuming Mac M1? It appears that Homebrew now has Generally, I don't recommend Homebrew because I've had multiple reports of installation issues in the past, but this shouldn't deter anyone from trying (after all, it should work). |
@abey79 Thanks for your reply. I did manage to get pyside installed |
@krummrey from the
|
@krummrey honestly I'm not sure what's going on exactly. In such case I would try to delete the virtual environment and start from scratch, make sure that you create the venv with the right python executable (using full path ideally):
|
Just did a successful install of
Thanks for the instructions above :) |
Edit by @abey79:
Thanks to MacPorts now properly supporting pyside2 and its dependences (in particular qt5-qtwebengine, thanks @chrstphrchvz!), this issue is now resolved. The install procedure is as follows:
Install/upgrade MacPorts
If you don't have MacPorts installed, install it from here. You will need to install Xcode if you haven't already.
If you had MacPorts previously installed, make sure its package database is up-to-date:
Install required packages
(optional) Make Python 3.9 the default interpreter
This is not strictly necessary, but this step will make
python
point towards MacPorts' Python 3.9.x.Create a virtual environment for vpype
Important: note the use of
--system-site-packages
. This will make the MacPorts-installed package (in particular pyside2) available to the virtuel environment. This is critically important becausepip
is unable to install PySide2 on arm64 Macs (this will likely never change).Using the full path for the python interpreter is not needed if
python
points to the right interpreter (ie. you did the previous step and yourPATH
is not messed up.Activate the virtual environment and install vpype
Check that the install was successful:
original message by @theomega
This is very likely not vpypes fault, but you can't install vpype using pip on Mac OSX if your machine is one of the new m1 based arm machines.
Reason is that the PySides2 package can't be installed on these machines as there is no official port of QT python bindings for the M1 yet.
Error Message:
Manual install of PySide2:
Some more information can be found on the QT Forum here:
https://forum.qt.io/topic/124289/mac-m1-pyside-2-6-can-t-install-lib
The text was updated successfully, but these errors were encountered: