-
-
Save natevw/3e6fc929aff358b38c0a to your computer and use it in GitHub Desktop.
brew update | |
brew install pyqt geos spatialindex | |
easy_install pip | |
pip install virtualenv | |
cd Development/Others\'/ | |
mkdir FlatCAM | |
cd FlatCAM | |
virtualenv env | |
source env/bin/activate | |
pip install numpy matplotlib rtree scipy shapely simplejson | |
# copy contents of FlatCAM_8.1.zip into FlatCAM folder | |
python FlatCAM.py |
Oh @juansebastianUTech FWIW, I was able to brew install flatcam-beta
earlier today without problem; MacOS 11.6.3 on x86_64.
vispy
doesn't show up in my brew list
but it is listed under all 4 versions of pip
I know about (sigh).
which makes sense since homebrew on M1 macs gets installed under /opt from my understanding
That's actually promising. Again, I'm not speaking from any experience here...
That may mean one of two thing:
- You can install a whole x86_64
flatcam-beta
version and all of its x86_64 dependencies; independent of any other homebrew stuff you have M1 native. - There is some trick in homebrew to have them cross over between the two architectures. I say that because homebrew already has a habit of installing stuff in location
A
and linking to them from a locationB
in your path. I imagine any dynamically-linked libraries that aren't universal will absolutely require two arch versions installed -- somehow...
Good luck; and let me know if you resolve it. I'd like to be prepared for the arm64 move.
ahh good point, I will report back if I can make it work!
Hi, when running python3 FlatCAM.py I get ModuleNotFoundError: No module named 'ezdxf.math.vector'. How do I fix it?
I am on a MacBook Pro M1 with MacOS Monterey.
Regards RonnyP
Well, I got it to run on macOS Monterey v12.1 Beta (21C5021h)!
After countless hours of trying to get it to work, I caved in and used Homebrew to install it, which almost worked - I only got the
AttributeError: module 'vispy.visuals.markers' has no attribute '_marker_dict' error
... ;)Then I decided to give another try with @mjparme's instructions, with one addition - in
requirements.txt
file I didn't removegdal
(it didn't throw an error anymore, but it may also be due to Homebrew install) AND I setvispy==0.6.6
(v0.9.3 was installed). Than I ranpip3 install -r requirements.txt
again, thenpython3 FlatCAM.py
and... voilà! 🎆Needless to say that Homebrew version now works as well ;)
That's how I got to work the latest beta on Windows11 with WSL 2 (Ubuntu)
I wonder if it would be possible to create a FlatCAM conda package and then create a conda environment that could be shared so FlatCAM is just ready to go?
For any Conda users out there, below is the yaml file I used to get FlatCam Beta 8.994 running on an M2 Pro chip with osx-64 as well as osx-arm64 (plus point of the latter is the native support of the dark system theme). I basically took the contents of requirements.txt and installed all but or ortools
and rasterio
through conda and additionally enforced vispy<=0.9.0
which is the last version where the _marker_dict
still existed.
Not sure if this is relevant, but I used micromamba
to create the conda environment from this environment file.
For osx-arm64:
micromamba create -n FlatCAM -f <path to FlatCAM.yml>
For osx-64:
CONDA_SUBDIR=osx-64 micromamba create -n FlatCAM -f <path to FlatCAM.yml>
Then just activate that environment
micromamba activate FlatCAM
and run in the unzipped Beta 8.994 directory
python FlatCam.py
Maybe this could be used as starting point for a Conda recipe?
# Content of File FlatCAM.yml
name: FlatCAM
channels:
- conda-forge
dependencies:
- python=3.8
- pyqt>=5.12.1
- numpy>=1.16
- matplotlib>=3.1
- cycler>=0.10
- python-dateutil>=2.1
- kiwisolver>=1.1
- six
- setuptools
- dill
- rtree
- pyopengl
- vispy<=0.9.0 # starting with 0.9.1 _marker_dict is gone
#- ortools-python>=7.0 # only available on linux, use pip for the moment
- svg.path>=4.0
- simplejson
- shapely>=1.7.0
- freetype-py
- fontTools
#- rasterio # produces missing gdal library error use pip for now
- lxml
- ezdxf
- qrcode>=6.1
- reportlab>=3.5
- svglib
- gdal
- pyserial>=3.4
- pip:
- ortools>=7.0
- rasterio
Does anyone know whether a version of FlatCAM compatible with macOS Catalina could be built directly on Github Actions?
I'm currently following the steps in this video, but it's taking me too long to install pyqt via homebrew.
FlatCAM_beta_8.994_sources % python FlatCAM.py
Traceback (most recent call last):
File "/Users//FlatCAM/FlatCAM_beta_8.994_sources/FlatCAM.py", line 6, in
from app_Main import App
File "/Users//FlatCAM/FlatCAM_beta_8.994_sources/app_Main.py", line 47, in
from appCommon.Common import LoudDict
File "/Users//FlatCAM/FlatCAM_beta_8.994_sources/appCommon/Common.py", line 88, in
class LoudUniqueList(list, collections.MutableSequence):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'MutableSequence'
plc help me
if you are using python 3.10+ change import collection
in appCommon/Common.py to
import collection.abc
collections.Iterable = collections.abc.Iterable
collections.Mapping = collections.abc.Mapping
collections.MutableSet = collections.abc.MutableSet
collections.MutableMapping = collections.abc.MutableMapping
if you are using python 3.10+ change
import collection
in appCommon/Common.py toimport collection.abc collections.Iterable = collections.abc.Iterable collections.Mapping = collections.abc.Mapping collections.MutableSet = collections.abc.MutableSet collections.MutableMapping = collections.abc.MutableMapping
After that I get the error ModuleNotFoundError: No module named 'ezdxf.math.vector'
Module ezdxf is installed
How can I fix it?
Thanks for an reply
After that I get the error ModuleNotFoundError: No module named 'ezdxf.math.vector'
This was fixed on the Beta branch in this commit
See also this issue
I'm currently in the process of getting FlatCAM build with MacPorts.
I finally got it all working, but it will still take some time until I got all newly created port files for flatcams dependencies into shape to get them into the upstream macports repo.
One thing I wanted to share here, though: The problem with
AttributeError: module 'vispy.visuals.markers' has no attribute '_marker_dict' error
is due to a "patch" in appGui/VisPyPatches.py
, which has long been available in upstream VisPy. So lines 16-34 in this file can safely be removed and then flatcam also runs with newer (i.e., > 0.9.0) vispy versions.
anyone know about this error ?
Traceback (most recent call last):
File "/Users/isai/Desktop/FlatCAM/FlatCAM.py", line 6, in
from app_Main import App
File "/Users/isai/Desktop/FlatCAM/app_Main.py", line 94, in
from appTools import *
File "/Users/isai/Desktop/FlatCAM/appTools/init.py", line 38, in
from appTools.ToolShell import FCShell
File "/Users/isai/Desktop/FlatCAM/appTools/ToolShell.py", line 19, in
import tclCommands
File "/Users/isai/Desktop/FlatCAM/tclCommands/init.py", line 75, in
module = loader.find_module(name).load_module(name)
^^^^^^^^^^^^^^^^^^
AttributeError: 'FileFinder' object has no attribute 'find_module'
I presume you are trying to run flatcam with python 3.12, because FileFinder.find_module, which has been deprecated since python 3.4 and removed in 3.12 (see https://docs.python.org/3.11/library/importlib.html#importlib.abc.PathEntryFinder.find_module).
So you can either switch to python < 3.12 or try to fix that line by using load_spec
instead.
@berkakinci thanks for checking that out. mmm it could very well be that its part of pip :/. however I tried installing it under x86_64
arch --x86_64 brew install flatcam-beta
and got:
which makes sense since homebrew on M1 macs gets installed under /opt from my understanding
I will be looking into the pip dependency