Mac OS installation instructions guide?

Issue #540 new
0x DEADBEEF created an issue

Hello!

Getting FlatCAM to run on mac os is quite journey. One can try to look for guides on google but it will generally take hours until one finds a guid that actually works. The guide on flatcam.org is very outdated and has not been working for years now.

So what are the currently working steps to get FlatCAM to actually run on macos? Any chance we could get the official guide up to date?

After following a few guides I have managed to get rid of all dependency errors but FlatCAM still refuses to start with following error:

% python FlatCAM.py           
Traceback (most recent call last):
  File "/Users/wolfgang/flatcam_bitbucket/FlatCAM.py", line 6, in <module>
    from app_Main import App
  File "/Users/wolfgang/flatcam_bitbucket/app_Main.py", line 47, in <module>
    from appCommon.Common import LoudDict
  File "/Users/wolfgang/flatcam_bitbucket/appCommon/Common.py", line 88, in <module>
    class LoudUniqueList(list, collections.MutableSequence):
AttributeError: module 'collections' has no attribute 'MutableSequence'

Python version is 3.10.0 via pyenv, confirmed with --version

Thank you!

Comments (5)

  1. Marius Stanciu

    Hi,

    The latest version of FlatCAM beta, 8.994, is not ready for Python 3.10. Use Python 3.9.
    Best regards,
    Marius

  2. 0x DEADBEEF reporter

    Ahh thank you! after switching to 3.9.7 i got this error:

    Traceback (most recent call last):
      File "/Users/wolfgang/flatcam_bitbucket/FlatCAM.py", line 58, in <module>
        VisPyPatches.apply_patches()
      File "/Users/wolfgang/flatcam_bitbucket/appGUI/VisPyPatches.py", line 32, in apply_patches
        markers._marker_dict['++'] = cross_lines
    AttributeError: module 'vispy.visuals.markers' has no attribute '_marker_dict'
    

    which was eventually fixed by modifying forcing vispy version to 0.6.6 by adding vispy==0.6.6 to requirements.txt

    really it would be really really good if the instructions for mac on the official page could be updated, it would save a lot of users a lot of time figuring it out.

  3. Marius Stanciu

    Hi,
    First, for FlatCAM beta at least, the development is done in Windows, for Windows. It is nice that it works in Linux and MacOS too but I do not use those OS’s therefore other people need to work and publish the details of the setup.

    Secondly, FlatCAM beta is a sort of unofficial version of FlatCAM. The manual on the FlatCAM website is for the latest official release of FlatCAM, currently at version 8.5. I don’t really see as possible to have the manual for FlatCAM beta (even if one existed which it do not since everything is still changing and what today is OK tomorrow may be obsolete) on the official webpage due of differences in how me (I’m behind the Beta package, together with a group of like-minded people) and JP Caram see the future for FlatCAM.

    And lastly, at the time of the release of the beta 8.994 all was OK but since it is now a year since the last release a lot of things changed which made the setup a little bit harder when running from sources with the latest versions of packages. For Windows it is easier since I publish also installers that have everything integrated.
    -Marius

  4. 知也松浦

    First, for FlatCAM beta at least, the development is done in Windows, for Windows. It is nice that it works in Linux and MacOS too but I do not use those OS’s therefore other people need to work and publish the details of the setup.

    I maintained [an installation workflow on macOS](https://github.com/tomoyanonymous/homebrew-flatcam) for several years, with homebrew (the most major package manager on macOS, and recently available on Linux too), so I leave enough information and problems on maintaining installation on macOS just for utility for Marius and someone in the future.

    Most of the problems are the dependency resolutions during an installation. Once it is correctly installed, most of the functions are seemed to be working correctly for me.

    Homebrew’s package script(called Formula) needs to specify a certain git revision to prevent conflicts between versions, so it can be managed regardless of updates on a development branch independently.

    So, putting a note for macOS users on some docs that brew install tomoyanonymous/flatcam-beta will not be obsolete…as long as I keep maintaining the package script.

    Ideally, the package script should be on homebrew-core (a kind of central repository maintained by the community) repo, not on my personal repository because most users use only the package on the central repo, however, it cannot be because installing pip dependencies in a homebrew’s virtual environment is technically allowed but not allowed in [homebrew-core’s policy](https://docs.brew.sh/Formula-Cookbook#specifying-gems-python-modules-go-projects-etc-as-dependencies). I tried maintaining the package script without pip according to the guideline but it increases the maintenance complexity too much.

    Also, preparing an automation workflow for building a self-contained application is not realistic because automating macOS’s notarization process for distributing application bundles is too far complex.

    Thus currently, maintaining a third-party script for Homebrew is a convenient solution. I myself am not an active user of FlatCAM now actually, then not sure whether I can continue maintaining the brew formula. If someone will prepare CI workflow including test, release, and packaging in the future, it will be time to integrate an auto-update of the brew formula.

  5. Log in to comment