# These instructions are for installing a conda environment for CODAS on an # Apple computer with an ARM chip. They are tested on an M1 machine; we expect # they will work the same on an M2 machine. The non-standard aspect arises # because as of 2022-09-08, conda-forge is not producing up-to-date (or workable) # basemap packages for ARM. Therefore we install everything we can with conda, # then use pip to install basemap from source. # If you have not already done so, install the command-line compiler tools: xcode-select --install # You can check this with gcc --version # which will print several lines of info if the compiler is installed. # Install miniconda: # 1) In any directory, download it: curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh # 2) and install it. bash Miniconda3-latest-MacOSX-arm64.sh # Accept the license and the default location, but answer "no" to the # question about initialization. # Now, back at the prompt, execute the initialization: ~/miniconda3/bin/conda init --all # Quit the terminal *application* (not just the window) and open a new # terminal. # Configure conda: conda config --set auto_activate_base false conda config --add channels conda-forge conda config --set channel_priority strict # Again, quit the terminal application, and open a new terminal. # Make the new environment: conda env create --file codas_processing_m1-m2.yml # and activate it: conda activate pycodas # Download basemap source, either via cloning from github or as follows: curl -Lo basemap.tgz https://github.com/matplotlib/basemap/archive/refs/tags/v1.3.8.tar.gz # Unpack, change into the appropriate directory, build, and install: tar -xvzf basemap.tgz cd basemap-1.3.8/packages/basemap pip install . # This will also install some, but not all, of the coastline data. We will # remove the data that pip installed and replace it with the full set from # conda: pip uninstall basemap-data conda install basemap-data-hires # Now the environment is complete, and you can proceed with # https://currents.soest.hawaii.edu/docs/adcp_doc/codas_setup/codas_config/index.html