[Thread Prev][Thread Next][Index]

Re: [ferret_users] libpyferret.so



Hi Dongxiao,

The quick answer:
To use this build of PyFerret for Mac OS X, you need to install the homebrew package manager's version of gcc, python, and pyqt, then do a pip install of numpy (and scipy and pyshp if desired).  So first step would be to install homebrew if you do not already have it installed.  See http://brew.sh/ for more information.  Then run:
    brew install gcc
    brew install python
    brew install pyqt
    pip install numpy
    pip install scipy
    pip install pyshp

More details:
The build of PyFerret for the Mac OS X requires the PyQt4 and NumPy Python modules.  In order to obtain those packages I used the homebrew package manager for OS X.  But this package manager installs packages (actually links to packages) under /usr/local instead of the standard system locations so as to not interfere with standard Mac products or packages from other package managers.  The PyQt4 and NumPy packages from homebrew use the homebrew Python package which is located in /usr/local/opt/python/.... as mentioned in the error message above instead of the system's version of Python. 

If you use the anaconda package manager:
There is a conda recipe that I think should be working quite soon.  (It is working for Linux.)  See https://github.com/conda-forge/pyferret-feedstock for more information.

Best regards,
Karl



On Fri, Aug 12, 2016 at 3:22 PM, Dongxiao Zhang - NOAA Affiliate <dongxiao.zhang@xxxxxxxx> wrote:
Hi,

I just installed pyferret on Mac OS X 10.11.5. After starting “pyferret”, I got the following error:

  File "<string>", line 1, in <module>
  File "/Users/dzhang/Ferret/lib/python2.7/site-packages/pyferret/__init__.py", line 42, in <module>
    import libpyferret
ImportError: dlopen(/Users/dzhang/Ferret/lib/python2.7/site-packages/pyferret/libpyferret.so, 2): Library not loaded: /usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/Python
  Referenced from: /Users/dzhang/Ferret/lib/python2.7/site-packages/pyferret/libpyferret.so
  Reason: image not found

Any idea what went wrong?

Thanks,

Dongxiao



--
Karl M. Smith, Ph.D.
JISAO Univ. Wash. and PMEL NOAA
"The contents of this message are mine personally and do
not necessarily reflect any position of the Government
or the National Oceanic and Atmospheric Administration."

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

Privacy Policy | Disclaimer | Accessibility Statement