Friday, April 10, 2026

 Updating Anaconda After a Year of Use

First, I forgot that my blogger account was associated with my older Google account linked ti jeffreypark00@gmail.com.  I had to log out of the other account to post this info.

On 4/9/2026 I upgraded my Anaconda on my M4 Macbook Pro from 2.6.6 to 2.7.0, while running MacOS Sequoia.  Here in the relocated Items folder, I kept copies of the /opt/anaconda3 directory and an alias of the Anaconda-Navigator App.  One curious thing is that my 2.6.6 version of Anaconda Navigator in my Applications Folder was dated Feb 2025, but the same App in the old anaconda3 directory was August 2025.  This discrepancy did not prevent me from running Anaconda Navigator nor prevent me from updating it via the GUI interface. 

In contrast, on my M3 iMac in my Yale office, running MacOS Sonoma, not Sequoia, the GUI-update failed, and I recall that the Anaconda-Navigator icon in the Applications folder was an alias of the App in the /opt/anaconda3 directory.  I tried to update the Anaconda Navigator on the iMac M3 with command-line use of "conda", but the updated package failed to complete its start.  So the iMac M3 still has Anaconda-Navigator version 2.6.6.

Subsequently, I discovered that the Intel iMac at home was running Anaconda-Navigator version 2.6.5.  Here was a different problem, because the Anaconda installation appeared to be split across "/opt/anaconda3" and "/Users/jjpark/opt/anaconda3" directories, with another directory alias at /Users/jjpark/anaconda that pointed to /opt/anaconda3.  I tried to upgrade the Navigator to 2.7.0, but was rebuffed by the Anaconda website that informs me that Anaconda installers and software packages for the Intel-chip Macs are no longer getting updated.  Apple is sunsetting the architecture in its forthcoming MacOS-27 releases, so that I will eventually need to upgrade to Apple Silicon to stay with a supported MacOS.  A couple of years, maybe, before I will need to buy an M5 or M6 iMac for home.  The setup files for terminals on my Intel iMac had not all pointed to the same anaconda file, and I verified that upgrading the Navigator to 2.6.6 and refreshing the environments wrote information to both Anaconda locations.  I tried to alter the alias files to force them to a single copy of Navigator, but succeeded in disabling the software.  I returned to the last Time Machine backup, restored the altered files, copied the anaconda envs directories from /opt/anaconda3 to /Users/jjpark/opt/anaconda3 and restored the functionality of Navigator.  I also verified that software and binary updates under Navigator make changes in only one of the locations now, in /Users/jjpark/opt/anaconda3.  This is the proper location for Intel Mac systems.  Apple Silicon systems install anaconda into /opt/anaconda3.   I checked that I could update packages in the environments and run a Jupyter notebook for several steps with ObsPy commands. 


Tuesday, May 13, 2025

Dont forget to install the image-processing commands from ImageMagick

 One of the useful Unix commands I have used is "convert" from ImageMagick.  This software survived several upgrades of MacOS, but not the transition to MacOS 15.4 Sequoia.  To re-install via MacPorts, one does this following

 sudo port selfupdate

 sudo port upgrade outdated

sudo port install imagemagick

and this places the Unix line-command "convert" into /opt/local/bin

 

Tuesday, February 4, 2025

Newer versions of MacOS (Sonoma & Sequoia) will not play well with Postscript files

macOS Sonoma does not support viewing or converting PostScript filesHowever, it can still output PostScript to printers that support it.

In particular, it is no longer possible to click on a *.ps or *.eps file and open it in the Preview app. This is very very annoyingInstall ghostscript on macOS with MacPorts.  This installs a number of executables, though not pstopdf.  After reading some programmer comments, I added the following faux pstopdf to call ps2pdf with an option to trim whitespace around an image:

alias pstopdf 'ps2pdf -EPSCrop'   # will crop whitespace around image

-> which ps2pdf

/opt/local/bin/ps2pdf

-> ls -l /opt/local/bin/ps*
-rwxr-xr-x  1 root  admin    631 Feb  4 10:47 /opt/local/bin/ps2ascii
-rwxr-xr-x  1 root  admin   1264 Feb  4 10:47 /opt/local/bin/ps2epsi
-rwxr-xr-x  1 root  admin    272 Feb  4 10:47 /opt/local/bin/ps2pdf
-rwxr-xr-x  1 root  admin    257 Feb  4 10:47 /opt/local/bin/ps2pdf12
-rwxr-xr-x  1 root  admin    257 Feb  4 10:47 /opt/local/bin/ps2pdf13
-rwxr-xr-x  1 root  admin    257 Feb  4 10:47 /opt/local/bin/ps2pdf14
-rwxr-xr-x  1 root  admin   1078 Feb  4 10:47 /opt/local/bin/ps2pdfwr
-rwxr-xr-x  1 root  admin    647 Feb  4 10:47 /opt/local/bin/ps2ps
-rwxr-xr-x  1 root  admin    669 Feb  4 10:47 /opt/local/bin/ps2ps2
-> 

Sunday, February 2, 2025

Installing MacPorts on M4 MacBook Pro, Installing nedit and GFortran and TeXworks in MacPorts in MacOS Sequoia 15.3

 Installing GFortran in MacPorts after Upgrading MacOS Ventura to MacOS Sequoia 15.3.   I took the advice of MacPorts.org and deleted all traces of MacPorts on my M4 laptop once I transferred files from my 2018-vintage Intel-based MacBook Pro.  Installing MacPorts from scratch was not difficult, but starting to install familiar software packages has some interesting quirks.  

Installing my favorite visual test editor nedit was a chore, as it usually is for such legacy software.  The installation first hung on a flawed download of the lzip software package.  I needed to Google and to otherwise comb the MacPorts support site to find a suggested fix for installing lzip.  But I found a solution from someone who had preceded me.  Once I could get past the first few seconds of the nedit install, the process took a long long long time and seemed to involve the download and compilation of several versions of Python (3.10 and 3.12).  All this was necessary for a simple convenient editor to use.  Unlike the current version on the Intel-Macs, this version of nedit seems to load very quickly.  Maybe something got fixed since I installed nedit on the M3 iMac in my office.

Installing gfortran via MacPorts is proceeding apace as I write this.  I am using the same commands I ran a week ago in my Sequoia upgrade on my Intel MacBook Pro.  There is a lot of compiling going on.  The final result seems to compile my codes well.  I have recompiled the utility codes in jlib.a, plotit.a and eislib.a.  

One last upgrade was to by LaTex equation-formatting software.  I have been very happy with TeXworks for processing manuscripts and lecture notes, but attempts to compile a version of TeXworks on my M4 laptop with either software downloaded from the TeXworks website or from MacPorts has failed.  The website suggests that, as of February 1, 2025, there is a MacOS Sequoia build for TexWorks on Intel Macs, but not for Apple Silicon.  At the same time the TeXworks page suggested that an Apple Silicon build of their software was available for MacOS Sonoma.   This triggered me to look on my M3 iMac for a working version of TeXworks, because the iMac is running MacOS Sonoma.  I had not noticed any glitches when I bought my M3 iMac last May, and indeed the app was working fine on my iMac.  I copied the TeXworks app into iCloud, transferred the copy to my MacOS Sequoia MacBook Pro, and it ran fine once I deleted the MacPorts version of the app.  There is ALSO a subdirectory of my Applications folder named "Tex" that dates from prior to the pandemic and occupies 121 Mb, including yet another version of the TeXworks app.  This legacy app seems to be software that I can delete.





New M4 MacBook Pro Software Installs -- Obspy within Anaconda

 

For switching my 2018-vintage Intel MacBook Pro to Apple Silicon, the old Anaconda installation persisted after I transferred files from the old laptop.  The location of the files was /Users/jjpark/opt/anaconda3, but there were also obsolete files in /Users/jjpark/anaconda3.  

The first thing to do is download Anaconda for Apple Silicon from www.anaconda.com site.  The New location for Anaconda files is the "shared" directory /opt/anaconda3.   When I opened Anaconda Navigator, the software asked me to update its version -- undating the Navigator is a tricky operation that fails unless you delete the correct process while leaving the updating process active.  Then you need to wait a bit before the Updator activates the button that you click to update the Navigator.  Annoying!

Once into Anaconda, it is useful to delete the old Intel-based environments, which occupy 1-4 Gbyte of disk space without being useful.  If the environment depends on Python 3.6 (/Users/jjpark/anaconda3) or depended on Python 3.9 in an Intel installation (/Users/jjpark/opt/anaconda3), one can use the Navigator to remove these environment and release the disk space.  There is a "Remove" button at the bottom of the Environments pane of Anaconda Navigator.

The new processing environments are located in /opt/anaconda3/envs.  To create these environments, I used the same commands as for the older computers.  The current Python version in Anaconda is 3.12, but I stayed conservative and kept my ObsPy environment in 3.9.  I have no assurance that ObsPy has been adapted to the latest Python versions, and 3.9 was working for me.

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 cartopy=0.21

conda activate obspy

conda info --envs

assuming that you are in the obspy environment . . .

conda install -c conda-forge obspy

conda install -c conda-forge jupyter

conda install -c conda-forge cartopy

conda deactivate

Note that I installed cartopy, rather than basemap.  I also used the option "-c conda-forge" for all install commands.   The most recent version of cartopy crashed my SS-precursor Jupyter notebook, so I restricted cartopy to the version on my Intel laptop, cartopy 0.21.  HOWEVER my Anaconda environment tells me that the casrtopy version there is 0.23.0, so I am not certain how I fixed the problem by specifying cartopy=0.21.  I found that I also needed to update scipy in my obspy environment to enable the notebook to import all the obspy libraries.  In that case my obspy environment DOES NOT have the highest upgrade of scipy, so that is a mystery as well.  The SS-precursor notebook executes into the data requests, however.

One quirk is that the new Anaconda python version does not allow me to use numpy.shape to return the dimensions of a list of lists.  I may stumble on more errors, but this is curious, because the M3 iMac did not present me with this syntax hangnail.


Thursday, January 30, 2025

Installing GFortran in MacPorts after Upgrading MacOS Ventura to MacOS Sequoia 15.3

 Installing GFortran in MacPorts after Upgrading MacOS Ventura to MacOS Sequoia 15.3

I purchased an M4 MacBook Pro laptop to replace my 2019-vintage Intel MacBook Pro.  The older laptop was still working well, aside from running out of disk space, but the prospect of China tariffs motivated an accelerated purchase and upgrade.  The new M4 laptop has actually been waiting a month for my changeover.  I decided to upgrade the older laptop to Sequoia MacOS to facilitate the transfer of files and file structures.  This enables me to perform the dirty work of reviving my computing environments in the context of a familiar keyboard.  

When I tried to compile a Fortran code in Sequoia before upgrading the Fortran installation, the compiler failed because it looked for a directory that exists in Ventura, but does not exist in Sequoia.  So I definitely needed to upgrade everything.

Following the JParkCodes post of May 30, 2023, I tried to selfupdate MacPorts.  logged in as root, I typed

port selfupdate

This command upgraded my MacPort software from 2.10.4 to 2.10.5.  I was also advised by the selfupdate that 

The ports tree has been updated.

65 ports are outdated. Run 'port outdated' for details.

To upgrade your installed ports, you should run

  port upgrade outdated

After trying to upgrade the outdated ports, the software snagged on an update for gcc12.  I believe that this version of gcc is obsolete in Sequoia, and the proper version will be gcc14. 

sudo port install gcc14

This command executed successfully.  I needed to re-run 

  port upgrade outdated

to complete the upgrade.  However, FIRST I need to remove the gcc12 port, because the command hangs on it.

port uninstall gcc12

If an upgrade process hangs, one must kill the associated process in order to uninstall gcc12.  I lwarnewd this the hard way.

Once the gcc14 port is installed, then one must set up the aliases properly to compile Fortran and C programs.  My changes to .cshrc were the lines

alias cc            '/opt/local/bin/gcc-mp-14'

alias gcc           '/opt/local/bin/gcc-mp-14'

alias gfortran      '/opt/local/bin/gfortran-mp-14'



Thursday, November 14, 2024

Upgraded Macbook-Pro operating system from Monterey to Ventura


With the introduction of MacOS15 Sequoia, the mavens at Apple dropped support for MacOS12 Monterey.  I held on for a month or so while two updates of the Microsoft Apps came and went without my laptop able to download them.  Yesterday I tried to edit a Word file sent to me by someone.  The older software was not working well in edit mode, so I decided to upgrade everything.  I do not want to scale the heights of MacOS15 Sequoia yet, because it may introduce a new wrinkle in my legacy Fortran codes.  Consulting the Apple help pages with the Google, I determined that one can upgrade to an older system through the App Store, so I followed the link to the latest version of MacOS13 Ventura, an operating system that Apple will probably support until Fall 2025.  By then I will have upgraded my laptop to an Apple M4 chip and be digesting Sequoia on it.  Both iMacs are currently running MacOS14 Sonoma without serious problems, but I havent been developing Fortran codes on them.  So Ventura was the upgrade.

The upgrade notes from May 2023 worked successfully, installing MacPorts and then using MacPorts to install gcc12 and its gfortran code.  The only wrinkle was the need to alter one of the MacPorts auxiliary files (sources.conf) to correct a misleading weblink for software tarballs.  This file proved challenging to find on my laptop -- I needed the Google to find the breadcrumbs left by previous programmers with the same installation bug.

My altered legacy codes from 2023, changed to accommodate the syntax rules of Fortran 2018, worked OK.  When compiled, there were many warnings about arrays out of bounds, owing to the past use of the old DIMENSION B(N,1) syntax that left the number of rows in an array open.  A warning, not an error, so the codes can be used without changing all the DIMENSION statements.

In other housekeeping, I upgraded the ObsPy39 environment in Anaconda to ObsPy 1.4.1.  Not tested yet.  Need to sync with the iMacs, probably.  Anaconda itself did not nudge me to upgrade the Navigator.

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.  


Thursday, June 8, 2023

How to fix a split Fusion Drive (May 2023)

 

This page helped me to resuscitate an ailing iMac in my office.  It was while executing this fix that I upgraded MacOS to Ventura and broke my Fortran computing environment.  Still, it was worth it.

https://support.apple.com/en-us/HT207584

If your Fusion Drive appears as two drives instead of one in the Finder, it's no longer working as a Fusion Drive. Here's how to fix it.

Fusion Drive, a storage option on some iMac and Mac mini computers, combines a hard drive and flash storage in a single volume for improved performance and storage capacity. If your Fusion Drive appears as two drives instead of one in the Finder, it's no longer working as a Fusion Drive. This can happen after replacing either drive of your Fusion Drive, or using software to intentionally split them into separate volumes. 

You can continue using the two drives independently, or follow these steps to regain the benefits of having the single logical volume of a Fusion Drive.


. . . .  see the support page at Apple

Adjusting to MacOS Ventura and gcc12 and Fortran 2018 syntax rules: Various Subroutines

 Sportsfans,

The upgrade to MacOS Ventura has broken my Fortran programming environment, mainly by moving the directories of the operating system around so that older versions of gfortran and gcc cannot find their proper libraries.  Rather than spend hours recreating the original file structures and libraries from old backups and the Relocated Items folders, I decided to level up to the latest GNU C and Fortran compilers as maintained by MacPorts.  These are gcc12 -- version 12 of the venerable GNU freeware package.  The old Fortran programmers must have retired, because these new compilers have discarded several aspects of Fortran 66 syntax that I learned as a teenager.  I don't write code with this older syntax, having transitioned to the Fortran 77 syntax of do/end do loops and if/then/else branches while in graduate school.  Nevertheless, there is plenty of legacy code in my toolboxes, and some of these subroutines have do loops that end on an executable statement, and others contain nested loops that terminate on the same numbered statements.  The new Fortran boffins outlawed these syntaxes, along with the arithmetic IF statement, in Fortran 2018.  My legacy codes have plenty of arithmetic IF statements, so all of these had to be reprogrammed to comply with gcc12.

This post is the third of a handful of posts that will provide these upgraded codes.  Here are a collection of subroutines that resided in my subdirectory Ritz for inclusion in various codes.  I scrubbed my Real*4 C-language FFT subroutine refft.c from my old codes a few years ago, in favor of the Real*8 Fortran routine fft2.f.  Some codes are free-oscillation subroutines that date from Freeman Gilbert, Ray Buland and/or John Woodhouse, all of whom wrote many legacy codes before the advent of Fortran 77.  All codes are contained in a zipfile codes_jlib_fort18.zip on the Google Drive subdirectory.

gfortran -c subroutine.f 

gfortran -o PROGRAM PROGRAM.f subroutine.o

subroutines include 

cossin.f

csolve.f

fft2.f

gxfcn.f

qromb.f

qtrap.f

rspln.f

solve.f

splneq.f

splnsm.f

svd.f


https://drive.google.com/drive/folders/0B5cfVtTS8QXZTGc1WnViSE5RWjA?resourcekey=0-YidcAd0wJGPRR1PhAyUYNA&usp=sharing

Adjusting to GCC12 upgrade in MacOS Ventura. Updated version of the EISPACK package.

  Sportsfans,

The upgrade to MacOS Ventura has broken my Fortran programming environment, mainly by moving the directories of the operating system around so that older versions of gfortran and gcc cannot find their proper libraries.  Rather than spend hours recreating the original file structures and libraries from old backups and the Relocated Items folders, I decided to level up to the latest GNU C and Fortran compilers as maintained by MacPorts.  These are gcc12 -- version 12 of the venerable GNU freeware package.  The old Fortran programmers must have retired, because these new compilers have discarded several aspects of Fortran 66 syntax that I learned as a teenager.  I don't write code with this older syntax, having transitioned to the Fortran 77 syntax of do/end do loops and if/then/else branches while in graduate school.  Nevertheless, there is plenty of legacy code in my toolboxes, and some of these subroutines have do loops that end on an executable statement, and others contain nested loops that terminate on the same numbered statements.  The new Fortran boffins outlawed these syntaxes, along with the arithmetic IF statement, in Fortran 2018.  My legacy codes have plenty of arithmetic IF statements, so all of these had to be reprogrammed to comply with gcc12.

This post is the second of a handful of posts that will provide these upgraded codes.  Here is the venerable EISPACK package of linear-algebra subroutines for inclusion within a Fortran program.   

gfortran -c eispack_fort18.for  

ar r eislib.a eispack.o

ranlib eislib.a

gfortran -o PROGRAM PROGRAM.f eislib.a


https://drive.google.com/drive/folders/0B5cfVtTS8QXZTGc1WnViSE5RWjA?resourcekey=0-YidcAd0wJGPRR1PhAyUYNA&usp=sharing

Adjusting to MacOS Ventura and gcc12: plotit software changes

 Sportsfans,

The upgrade to MacOS Ventura has broken my Fortran programming environment, mainly by moving the directories of the operating system around so that older versions of gfortran and gcc cannot find their proper libraries.  Rather than spend hours recreating the original file structures and libraries from old backups and the Relocated Items folders, I decided to level up to the latest GNU C and Fortran compilers as maintained by MacPorts.  These are gcc12 -- version 12 of the venerable GNU freeware package.  The old Fortran programmers must have retired, because these new compilers have discarded several aspects of Fortran 66 syntax that I learned as a teenager.  I don't write code with this older syntax, having transitioned to the Fortran 77 syntax of do/end do loops and if/then/else branches while in graduate school.  Nevertheless, there is plenty of legacy code in my toolboxes, and some of these subroutines have do loops that end on an executable statement, and others contain nested loops that terminate on the same numbered statements.  The new Fortran boffins outlawed these syntaxes, along with the arithmetic IF statement, in Fortran 2018.  My legacy codes have plenty of arithmetic IF statements, so all of these had to be reprogrammed to comply with gcc12.

This post is the first of a handful of posts that will provide these upgraded codes.  The first is the venerable, and oft-hated, plotit subroutine for on-the-fly XY-plotting within a Fortran program.  I include versions of plotit.f 

gfortran -c plotit.f  -L/usr/X11/lib -I/usr/X11/include -lX11

gcc -c xlplotit.c -L/usr/X11/lib -I/usr/X11/include -lX11

ar r plotlib.a plotit.o xlplotit.o

ranlib plotlib.a

gfortran -o PROGRAM PROGRAM.f plotlib.a -L/usr/X11/lib -I/usr/X11/include -lX11

I keep the compiled plotit object code in a signature directory for adding to my codes:

 /Users/jjpark/Plotxy/plotlib.a

In the zipfile Plotlib_fort18.zip I include updated versions of contour.f and makedat.f for similar on-the-fly plotting of a contour plot, and test-plotting with plotit.  I haven't tested these, so shoot me an email if they crash.


https://drive.google.com/drive/folders/0B5cfVtTS8QXZTGc1WnViSE5RWjA?resourcekey=0-YidcAd0wJGPRR1PhAyUYNA&usp=sharing




Tuesday, May 30, 2023

Installing GFortran in MacPorts

 After some googling, I discovered the pages on how to install gcc and gfortran in MacPorts.

There are several versions of gcc available, but all except version 12 returned a warning that their installation would fail.  This is probably a MacOS Ventura thing -- is version 12 the version for Ventura?

sudo port install gcc12 

worked without too much fuss, not to long to install, and gfortran seems to be part of /usr/local/bin

bin/gfortran-mp-12

bin/gcc-mp-12

One can alias these in the .cshrc file, or can ask macports to do it.  From 

"I had to combine these two answers as follows: sudo port install gcc11 +gfortran; sudo port select --set gcc mp-gcc11 
– pidloop
 Jan 19, 2022 at 23:12"

The spelling of this port command for aliasing is correct, even though the spelling of the executable file in the ./bin subdirectory is different

sudo port select --set gcc mp-gcc12

enables the command "gfortran" to find the gcc12 version of gfortran.



A Few Words about MacPorts

 The first of three computers to upgrade to MacOS Ventura, so making all the old tools work will be done thrice.  I document the first try.

The computing environment I am accustomed to relies on GCC Fortran and the text editor nedit.  Nedit is the "Nirvana editor" from way way back, but I am used to it in Xwindow environments.  Nedit has always been an open-source tool that could be loaded with Fink, but Fink is no more.  The Nedit software has a website, but downloading this package led to failure, because it was not updated to the system directories of Ventura.  The software package aggregator MacPorts has nedit, and has been updated.  So that is where I went for it.

https://manjaro.site/install-macports-on-macos-ventura/

https://www.macports.org/

From documentation:

"This installer contains a Universal installer for macOS 13.0.x and requires the curl and OpenSSL libraries provided by macOS. To build ports locally, you will need to install the Xcode Command Line Tools by running "xcode-select --install" in your terminal. Also required for many GUI applications is the installation of Apple's Xcode development suite, available from the Mac App Store or from Apple's Developer site. It is also available as a separate installation on Mac OS X CDs and DVDs."

"The MacPorts installer copies MacPorts to the target directory /opt/local. If you wish to install to any path other than that, you must install MacPorts via its source code. See Installing MacPorts on the MacPorts webpage for instructions on installation alternatives."

"The main user interface to MacPorts is the port command and the various facilities it provides for installing ports. The first thing you should do after you install MacPorts is to make sure it is fully up to date by pulling the latest revisions to the Portfiles and any updated MacPorts base code from our rsync server, all accomplished simply by running the port selfupdate command as the Unix superuser:

sudo port selfupdate

Running this command on a regular basis is recommended -- it ensures your MacPorts installation is always up to date. Afterwards, you may search for ports to install:

port search <portname>

where <portname> is the name of the port you are searching for, or a partial name. To install a port you've chosen, you need to run the port install command as the Unix superuser:

sudo port install <portname>

where now <portname> maps to an exact port name in the ports tree, such as those returned by the port search commandPlease consult the port(1) man page for complete documentation for this command and the software installation process."

Monday, May 29, 2023

Upgrade to MacOS Ventura breaks things!

 My office iMac lost its Fusion Drive functionality during a past system upgrade, unbeknownst to me.  It was so so slow!  It took some online sleuthing to discover the likely cause and to organize a fix.   The office iMac has regained its speed, but in doing so I perforce upgraded to MacOS Ventura. This broke the handful of applications leftover from Fink, a software package that has kept my Macs useful since the early 1990s.  The Fink software package has never been updated to install properly in MacOS 11 (Big Sur), so installing it into Ventura would be a fool's game.  The directories have been moved around and the older files won't compile.  Luckily the Ports software package has been upgraded as MacOS has evolved, so I am switching to that.

Thursday, February 16, 2023

Converting Basemap to Cartopy within ObsPy Jupyter Notebooks

 So far my trick is to replace the statement 

from mpl_toolkits.basemap import Basemap

with

import cartopy.crs as ccrs

and this seems to work in the first notebook I tried  (QLove notebook for SNZO)

Upgrading the Python Version within Anaconda

 The upgrading of Python within Anaconda is complicated by the planned obsolescence of Python versions in the Anaconda software.  As of 02/16/2023, Anaconda has support for Python 3.7 and higher.  As a result, simply upgrading

conda install python=3.9

might work if you have 3.7 or 3.8 already installed.  However, I had my obspy environment set up with Python 3.6, and the version would not update automatically.  This prevented me from updating obspy and many other packages.  My solution is to create a new environment for the upgrade, and install Python 3.9 directly into it.  From the webpage:

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

Create a new environment within Anaconda

conda create -n obspy39 python=3.9

conda activate obspy39

conda info --envs

assuming that you are in the obspy39 environment . . .

conda install -c conda-forge obspy

conda install jupyter

conda install cartopy

Note that I installed cartopy, rather than basemap.  The latter would not install properly, and it is the older version anyway.  At the end of this exercise, I had two obspy environments, obspy and obspy39.  One can delete the older creakier version once you are certain that the new one works.




Updating Anaconda Navigator from Version 1.x to Version 2.x

 Once Anaconda sits on your computer, the updates start to annoy you.  If you ignore them long enough, however, they don't go away.  Eventually, the upgrades will no longer be simple.  For three of my MacOS computers, I first installed Anaconda 1.x, and for the home iMac I basically tore out my original installation in order to upgrade to Anaconda 2.x.  Upgrading from 1.x to 2.x need not be that drastic.  I discovered a procedure that works at a website

https://appdividend.com/2022/01/19/how-to-update-anaconda-upgrade-anaconda-navigator/

This procedure relies on entering line-commands in a terminal window, which you open within Anaconda Navigator.  Just go to the base environment and open a Terminal, rather than search for a Jupyter Notebook or a Python window.  In this Terminal, you might need to first update the conda app to its latest version

conda update conda

or

conda update -n base -c defaults conda

Then update Anaconda itself to a specific version, tied to a year and month, e.g., 

conda update anaconda=2022.10
or  
conda install anaconda=2022.10
In one case I installed the new Anaconda first, because the condo update hung the computer.

That metapackage represents the pinned state that has undergone testing as a collection.

If you want to update all the packages under conda distribution, you can use the following command.

conda update --all

The conda update –all will upgrade everything. This updates all packages in the current environment to the latest version.

Saturday, August 29, 2020

Endless Upgrade Notes for MacOS 10.15.6 Catalina: making gfortran work

 From August 18, 2020

I was using the Anaconda version of gfortran, and encountering problems with runtime libraries.  I had used the standard MacOS C-compiler clang as an alias for my gcc, and clang lacks fortran support.   

I switched to gcc-10 and gfortran-10, as of this date.  The runtime library problems I had yesterday afternoon induced me to install a fresh compiler via the Fink project.  http://www.finkproject.org   I am still checking that things are working correctly -- Catalina messed up more of my computing environment than I knew.

some info on this issue from a real programmer is here

https://solarianprogrammer.com/2019/10/12/compiling-gcc-macos/

And my commands were

fink selfupdate

fink install gcc10

The fink command compiled the compilers from scratch, so it too a few hours on a 2019 MacBook Pro.  Dont try this just before you need to carry your laptop someplace.

 
Link