sandialabs / WecOptTool

WEC Design Optimization Toolbox
https://sandialabs.github.io/WecOptTool/
GNU General Public License v3.0
12 stars 20 forks source link

Install on an ARM-based mac #324

Closed ryancoe closed 3 months ago

ryancoe commented 3 months ago

I have been through this a number of times, and always forget how I solved the problem, so maybe this is useful to someone else.

If you try the following:

mamba create -n wot_tmp1
mamba activate wot_tmp1
mamba install -c conda-forge wecopttool

you will get

Looking for: ['wecopttool']

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
pkgs/r/noarch                                                 No change
pkgs/main/osx-arm64                                           No change
pkgs/main/noarch                                              No change
pkgs/r/osx-arm64                                              No change
Could not solve for environment specs
The following packages are incompatible
└─ wecopttool is not installable because there are no viable options
   ├─ wecopttool [2.0.1a1|2.1.0|2.2.0|2.2.2] would require
   │  └─ wavespectra, which does not exist (perhaps a missing channel);
   └─ wecopttool [2.2.2|2.2.3|...|2.6.0] would require
      └─ capytaine, which does not exist (perhaps a missing channel).

I think this is because wavespectra and capytaine both include compiled binaries, and conda-forge is not generating those for ARM processors (yet).

ryancoe commented 3 months ago

Instead you should do the following:

  1. Make sure you have compilers installed on your system (see discussion, e.g., here: https://github.com/capytaine/capytaine/issues/190)
  2. Call the following commands (note the version number for python in the command below is based on current version number that wecopttool needs per pyproject.toml)
mamba install "python<3.12" pip
pip install wecopttool\[geometry] jupyter
ryancoe commented 3 months ago

Note that if you want to develop, replace the last two commands with:

mamba install "python<3.12" pip pytest ipykernel
pip install -e .\[dev,geometry]
cmichelenstrofer commented 2 months ago

@ryancoe you cannot install wavespectra and capytaine from conda?

ryancoe commented 2 months ago

Yes, I think so... definitely possible I was doing something wrong, but it seems to me that there are no arm64 binaries for these packages on conda-forge.

image

cmichelenstrofer commented 2 months ago

Yeah looks that way :( I wasn't able to either.