AnatomicMaps / flatmap-maker

Make anatomical flatmaps from SVG diagrams, Powerpoint slides, and other sources.
Apache License 2.0
2 stars 6 forks source link

Error running mapmaker via conda for MacOS #33

Closed keeran97 closed 1 year ago

keeran97 commented 1 year ago

Mapmaker crashes with the below error when running on an ARM based mac. mapmaker version v1.5.1 is being used (the latest release as of Oct 2022). the .yaml file was added by running conda env create -f conda/M1Mac.yaml in the flatmap-maker directory. the workflow for running mapmaker was

cd flatmap-maker
conda activate mapmaker
python runmaker.py --source ../rat-flatmap/manifest.json --output ../flatmaps --verbose 

The error:

Traceback (most recent call last):
  File "/Users/keeran/flatmap-maker/runmaker.py", line 21, in <module>
    from mapmaker.__main__ import main
  File "/Users/keeran/flatmap-maker/mapmaker/__init__.py", line 36, in <module>
    from .maker import MapMaker
  File "/Users/keeran/flatmap-maker/mapmaker/maker.py", line 36, in <module>
    from .flatmap import FlatMap
  File "/Users/keeran/flatmap-maker/mapmaker/flatmap/__init__.py", line 32, in <module>
    from mapmaker.geometry import FeatureSearch, Transform
  File "/Users/keeran/flatmap-maker/mapmaker/geometry/__init__.py", line 35, in <module>
    import transforms3d
  File "/Users/keeran/Library/Caches/pypoetry/virtualenvs/mapmaker-_XB-Uv6E-py3.9/lib/python3.9/site-packages/transforms3d/__init__.py", line 10, in <module>
    from . import quaternions
  File "/Users/keeran/Library/Caches/pypoetry/virtualenvs/mapmaker-_XB-Uv6E-py3.9/lib/python3.9/site-packages/transforms3d/quaternions.py", line 26, in <module>
    _MAX_FLOAT = np.maximum_sctype(np.float)
  File "/Users/keeran/Library/Caches/pypoetry/virtualenvs/mapmaker-_XB-Uv6E-py3.9/lib/python3.9/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Note that this is for the documentation on generating flatmaps. The above is for v1.5.1 of mapmaker but when using the latest versions (e.g. v1.6.0-b.1), the conda env fails to build with the below error.

keeran@wifi-staff-172-24-5-120 flatmap-maker % conda env create -f conda/M1Mac.yaml 
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - beziers[version='>=0.5.0,<0.6.0']
keeran97 commented 1 year ago

closed as i have resolved this.