[Thread Prev][Thread Next][Index]

[ferret_users] Solving the Mac/FRAME problem for PyFerret: use 7.5



Of interest to Mac PyFerret users ...

You probably saw the threads here noting that FRAME crops images to their upper-left corner in PyFerret post-7.5. (I have the latest 7.63). 
Workarounds have required writing a script, then running PyFerret with -nodisplay (see message 900 below and follow-ons).

Some of the discussion:
https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2019/msg00899.html
https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2019/msg00900.html
https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2019/msg00901.html
https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2019/msg00975.html
https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2019/msg01003.html
https://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2019/msg01009.html

Ryo and Wei and I struggled to understand this, then Gopika Suresh gave a hint that v7.5 did not have this problem.

With advice from Shaun Bell, a PMEL conda expert, I installed 7.5 on my MBP (late 2017 13-inch MBP running 10.14.6). 
Gopika is right: this fixes the FRAME problem.

Here are the steps to install v7.5 in a specific (named) environment, while also allowing normal upgrades in another.

Synopsis:
- create a named virtual environment for 7.5.
- activate this environment, install 7.5 in it
- start PyFerret7.5 with a shell pointing to the named environment

Three steps:

1) Choose a name for the environment (in quotes), and a python version (see NOTE below)
> conda create --name="pyferret75" python=2.7 

2) Activate the named environment
> conda activate pyferret75

3) Download and install PyFerret 7.5 in the new environment, thus without disrupting any other versions (which can be upgraded normally via conda)
> conda install -c conda-forge pyferret==7.5.0

Now, start PyFerret with a startup bash shell including the lines:

source $HOME/opt/miniconda3/bin/activate pyferret75      ! assuming you have chosen the name pyferret75
export FER_DIR=$HOME/opt/miniconda3/envs/pyferret75
... export [other FER_* directory definitions as usual] ...
$FER_DIR/bin/pyferret

==>> Works! FRAME output is not clipped!!!
I have not yet done thorough testing, but it appears to be fine.
Others who try this please report any anomalies to the group.
------------------
NOTE: It appears that PyFerret 7.5 will work with python versions 2.7 and 3.6-8, but not 3.9 which is my default. 
When I tried the conda install command above _without_ having defined and activated the explicit virtual environment and python version, it gave the error:
 
> conda install -c conda-forge pyferret==7.5.0     ! in my regular python 3.9 environment as used for 7.63
... various checking info...
failed                                                                                                                   
UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:
Specifications:
  - pyferret==7.5.0 -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']
Your python: python=3.9
---------------

These specifications say that PF7.5 will run using:

python version >=2.7 but <2.8.0a0
or >=3.6 but <3.7.0a0
or >=3.7 but <3.8.0a0
or >=3.8 but <3.9.0a0'

I didn't have 3.8 handy and was impatient, so I used 2.7.
=> Others who try this with 3.6 or 3.7 or 3.8 please report how it works.

Billy




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

Privacy Policy | Disclaimer | Accessibility Statement