Mac OS installation no longer possible
Versions of PyQt4 compatible with macOS Sierra don't currently exist. PyQtX requires Qt 4.8.2 libs which will not install on Sierra, and PyQtX also fails install. Homebrew no longer offers a compatible PyQt4; it installs PyQt5 which requires Python 3. Python 3 is of course not compatible with FlatCAM.
Unfortunately it seems the only long-lasting, non-duct-taped solution would be porting the project to Python 3.
Comments (19)
-
repo owner -
Should have checked here earlier but ended up spending the day trying to install on Mac OS instead with no luck. Ended up trying all the methods @macegr mentioned and probably more, trying to get PyQt4 via Homebrew, using PyQtX instead, trying to install Qt libs, re-installing python 2.7, etc.
The issue is not being able to install PyQt4 and, as seen below Homebrew only installs PyQt5 which only works in Python3.
> brew info pyqt pyqt: stable 5.8.1 (bottled) Python bindings for v5 of Qt https://www.riverbankcomputing.com/software/pyqt/download5 /usr/local/Cellar/pyqt/5.8.1_1 (856 files, 24.6MB) * Poured from bottle on 2017-04-08 at 15:49:22 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pyqt.rb
@macegr If you do have a short-lasting, duct-taped solution then it'd be good to hear!
-
Hi, just saw this and thought I'd help you out a bit. I managed to get it up and running on mac OSX Sierra using the latest MacPorts (2.4.1). PyQt4 installed but took a long time. I followed
jimthompson
's post here -> http://flatcam.org/discussion#!/?mac%20osx I'll post the steps I took here for completeness.sudo port install python27 sudo port select —set python python27 sudo port select —set python2 python27 sudo port install py27-readline sudo port install py27-sip sudo port install py27-pyqt4 # fails: complains about dbus - (Note: I didn't have this issue, pyqt installed first try but this was in the original post) sudo port -f activate bus sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist sudo port install py27-pyqt4 #(second time – this one succeeds – but takes a long, long time, most of it in the final configuring and building steps.) sudo port install py27-simplejson sudo port install py27-tkinter sudo port install py27-numpy sudo port install py27-matplotlib sudo port install py27-rtree sudo port install py27-shapely sudo port install py27-cairo sudo port install py27-pip sudo python -m pip install svg.path
Hope this works for you, good luck!
-
Hi,
I was able to do some progress, doing this:
https://robonobodojo.wordpress.com/2017/02/08/installing-pyqt4-on-mac-osx/
But did not know what exactly to do on step "Setting Up The Environment"
I was not able to fint the Flatcam.py described in the tutorial neither.
-
All you have to do in 'Setting Up The Environment' is to add the paths to the PyQt directories...
-
I'm also stuck at "Setting Up The Environment" could anyone explain exactly what I have to do? Thanks
-
After installing pyqt4 with:
brew install cartr/qt4/pyqt
as the instruction on https://robonobodojo.wordpress.com/2017/02/08/installing-pyqt4-on-mac-osx/
my entire homebrew python installation seems borked. I don't even have pip on path and can't do anything about it.
-
I managed to make it work just following the instructions to install pyqt4. No change made to the env python path. (most definitely that was what messed up your python install) There was some extra libs needed, but you get those from the errors and install using pip. like svg.path.
-
Good job Fernando! In all honesty, In recent times, I've started favouring PySide and PySide2 over PyQt4. They seem to be far more straightforward to install. Whichever library you use, it's possible to use Frederik Averpil's Qt module to unify code, just so long as you have one of the libraries.
-
Interesting, I don't know PySide & PySide2, will give that a look.
At first I started converting to PyQt5 as it would be far easier in regards to libs management, but some components changed and I went back to try with PyQt4. Plus I guess to submit a pull request it will also affect Linux & Win as the code base is the same.
One last thing that would be cool would be to package it for OSX, as I believe this would end this libs dependency nightmare.
-
PyQt4 and PyQt5 are administered by Riverbank Computing, whereas PySide and PySide2 are equivalent the ui technologies utilised by Python. Luckily, the code can all be tied together using that Qt module
-
As a temporal solution, I made a homebrew taps
https://github.com/tomoyanonymous/homebrew-flatcam
It resolves paths of python dependencies inside virtualenv. On my environment, it worked well.
-
Please, help testing out the following (tentative version 9 of FlatCAM):
https://bitbucket.org/jpcgt/flatcam/pull-requests/75/initial-port-to-python3-and-pyqt5/diff
It's a port to pyqt5 and python3 (no backwards compatibility with python2 nor pyqt4), works but needs more testing/feedback from the community:
-
What happened to that nice PR of @Roman Valls ? When will fellow Mac users get a native application?
PS I just spent several hours (before finding out this issue and brainstorm’s PR) to migrate to PyQt5 and it works for my purposes so far, but I would like it to be cemented in master. @jpcgt this migration is not the small one, you have to update everything at once. @Roman Valls did a nice job of not making it one big commit, so you can actually trace step by step what he was doing by looking at all commits that he made. Would you reconsider his PR?
If not, how can we make this happen?
-
Thanks for the kind words and support for my past work Maxim
I also though that I segmented the work on that PR appropriately but @jpcgt closed it and I also got some flak/criticism from another dev that did not like pyqt5 and wanted to stick with pyqt4 “because it is faster”…
I just lost interest because of those two events, but please do pick it up and PR it back to @jpcgt, I think this project deserves such a modernisation, IMHO.
-
Hi Maxim,
You can have a look at FlatCAM beta currently in version 8.96.
It’s build over FlatCAM VisPy branch and I did ported it to Python 3.x / PyQt 5.x since last year. The hard part was that FlatCAM 8.5 rely on try - except blocks assuming that raising an Exception is a non-fatal error. Which in PyQt5 it is, crashing the app immediately. But over time I managed to solve those issues.
Using the x64 packages and the mentioned port, the speed of FlatCAM beta is over 100% better than in FlatCAM 8.5: a complicated Gerber file load in FlatCAM beta took less than half the time needed by FlatCAM 8.5.Users reported that they are running it successfully on MacOS. For myself I only tried once with an older build into a VmWare virtual machine and it worked without issues.
-
@Marius Stanciu Thank you for response. I checked Beta branch, but I do not quite understand what is the proper way to run the app: there is no setup.py and no flatcam or any other executable as it used to be.
-
@Maxim Kulkin,
There is a FlatCAM.py file that needs to be run for the App to start. For the dependencies look in the requirements.txt or setup_ubuntu.sh
-
What’s the current status here? And what’s the plan for python3?
I am on a macOS 12.4 on ARM. - Log in to comment
I cannot help much with MacOS, but a simple search shows that: