Tuesday, May 21, 2024

New M3 iMac Software Installs: MacPorts and the nedit text editor.

 Migrating from an Intel iMac running MacOS Ventura to an M3 iMac running MacOS Sonoma involves no short cuts.  The Migration Assistant copies over lots of executable files that dont work properly.  Worse, the file structures of Ventura do not all carry over into Sonoma.  I had to erase all older Anaconda environments and also physically delete files on /Users/jjpark/anaconda3/envs and re-create environments that the Sonoma version of Anaconda placed onto /opt/anaconda3/envs.  Otherwise I could make multiple environments in different locations with the same name.  Old non-functional environments from the earlier installations, and newer ones that worked.

MacPorts was similar.  I had to uninstall the MacPorts installation that had been migrated from the older Intel computer.  Then install a fresh version of MacPorts.  Unfortunately, there was a glitch in the library binary for the graphical text editor nedit, so that the executable would complain about a missing element in a dynamic library.  This is the glitch

--> nedit .cshrc 
 dyld[93664]: Symbol not found: _vendorShellWidgetClass
  Referenced from: <B0C176D5-4F1E-316E-A53A-2EA6B4F48FBA> /opt/local/bin/nedit
  Expected in:     <C5BDACE7-B18C-3905-8915-706615092114> /opt/local/lib/libXm.4.dylibTrying to use the nedit program on my new iMac M3, after installing MacPorts for Sonoma 

I went to MacPorts website and submitted a ticket with a query for the MacPorts programmer community.  I got a solution within the workday! Here it is:

I can reproduce the problem on my own (macOS 12 x86_64) system if I receive a binary of nedit compiled on our build servers last year. However if I rebuild it from source (sudo port -ns upgrade --force nedit) then it works. Does that work for you too?

It worked for me as well!

Monday, May 20, 2024

New M3 iMac Software Installs -- Obspy within Anaconda


For switching to Apple Silicon, the old Anaconda installation persisted after I transferred files from the old 2017-vintage iMac.  The location of the files was /Users/jjpark/opt/anaconda3, but there were also obsolete files in /Users/jjpark/anaconda3.  The New location for Anaconda files is the "shared" directory /opt/anaconda3.   The processing environments are located in /opt/anaconda3/envs.  To create these environments, I used the same commands as for the older computers

My solution is to create a new environment for the new obspy environment, and install Python 3.9 directly into it.  First, open a terminal window within Anaconda.  From the webpage:

https://www.geophysik.uni-muenchen.de/~megies/installation2.pdf

Create a new environment within Anaconda by typing commands into the terminal window"

conda create -n obspy python=3.9

conda activate obspy

conda info --envs

assuming that you are in the obspy environment . . .

conda install -c conda-forge obspy

conda install jupyter

conda install cartopy

Note that I installed cartopy, rather than basemap.  


 
Link