[Thread Prev][Thread Next][Index]

Re: [ferret_users] pyferret on M2 macs



Dear Ferret users,

I spoke too soon yesterday: my new pyferret installation didn't work.  It had this problem: https://github.com/conda-forge/pyferret-feedstock/issues/94 .  So, I implemented the solution shown in this URL and then pyferret finally worked.

Here I list the bash commands you use to install pyferret from scratch on a new Mac.

bash$ brew install minicona
bash$ conda=/opt/homebrew/Caskroom/miniconda/base/bin/conda
bash$ $conda config --env --set subdir osx-64
bash$ $conda create -n FERRET -c conda-forge pyferret ferret_datasets python=3.9 --yes

assuming that you have had Homebrew already installed.


conda does not build or compile PyFerret, it can only install and link already-compiled versions with the utilities (python) and packages it needs. 

But there is no version of Pyferret built for arm64, at least not on github. (There are arm64 python and conda versions, however).


Yes, that's the reason why we need to use the osx-64 repository, which is (presumably) for binaries that work both on Intel and on ARM CPUs.

 
The stackoverflow page you link to is running Pyferret through Rosetta (Apple tool to run pre-arm64 code) without any sort of announcement that it's doing so. 

This matters to me because it appears that a user needs admin privileges to run Rosetta. It can't be done from a non-admin account (if you know a way please tell me). While I do have an admin account, it's for development and I'm not allowed to use it for routine work.


I didn't know that there was such a restriction.  In the past few years since I bought an M1 mac mini, I've run many Intell binaries on it.  Has this been possible because I have an admin privilege?

In the above command sequence, the installation of miniconda requires your password, where your admin privilege is used. But, otherwise, I don't see how admin privilege is used.  After the installation of miniconda, I do everything as an ordinary user.

By default, the ordinary user account comes with an admin privilege such that you can carry out almost all amin tasks by "sudo <some command>" with your ordinary password.  Type "id" at the command terminal and you'll see you are in the "admin" group.  In /etc/sudoers, you find this line

 %admin          ALL = (ALL) ALL

which means anybody in the "admin" group can do anything.  (To see the contents of /etc/sudoers, you have to use "sudo".) So, I suppose the worst-case scenario is that you need to sudo to run pyferret . . . (which I don't)
 

Did you do this from an admin account? Or having installed Pyferret via conda as an admin per stackoverflow, can you then run it from a regular account? 


So, yes, I use my admin privilege to install miniconda using homebrew, but otherwise I do everything as an ordinary user.

If you download miniconda from its homepage, then it installs itself under your home directory.  In that case, you shouldn't need to use your admin privilege at all.

Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement