conda-forge / pygrib-feedstock

A conda-smithy repository for pygrib.
BSD 3-Clause "New" or "Revised" License
2 stars 8 forks source link

Installing pygrib with conda-forge #18

Closed muuud closed 6 years ago

muuud commented 6 years ago

Hello, I am trying to install pygrib using this repository, and have followed the instructions given.

When I try to import the pygrib module in a script, I receive the following error:

ImportError: dlopen(/Users/Alex/miniconda2/lib/python2.7/site-packages/pygrib.so, 2): Library not loaded: @rpath/libjpeg.9.dylib
  Referenced from: /Users/Alex/miniconda2/lib/libgrib_api.dylib
  Reason: image not found

Is there something I am missing? My installation of conda could sometimes be a bit weird as I accidentally installed it using sudo and now everything requires sudo.

ocefpaf commented 6 years ago

My installation of conda could sometimes be a bit weird as I accidentally installed it using sudo and now everything requires sudo.

I highly recommend you to reinstall it in your user space. That could be the culprit here.

I don't have a OS X system to try this but those files are in the packages and the Linux version is working properly.

dopplershift commented 6 years ago

For me on osx, creating a new environment with conda create -n test-grib python=2.7 pygrib allows me to run python -c 'import pygrib' without error.

muuud commented 6 years ago

This works! However, in doing this, I'm not actually sure what I am doing. Do I always have to restart this test environment when running a script with pygrib? Basically, how can I be sure that it'll work at anytime

ocefpaf commented 6 years ago

You have to always activate the environment to be able to use what is installed there.

One alternative, that I do not recommend, is to install the packages in your root environment. But that can be messy and lead to a broken environment very easily when mixing packages and channels.

Closing this b/c the package is working. Feel free ask more question here though.