pythoncondapygrib

Install pygrip and conda forge


I am trying to install pygrib to extract some data from grib1 files. I found this: Installing pygrib Package answer that recommended using conda-forge. Which I didn't know existed. Anyway, I made a new environment and used the conda install -c conda-forge pygrib=2.0.1 command. It seems to have installed everything fine (I have pygrib 2.0.1 . py35_3 . conda-forge listed when I call conda list So it seems to have installed everything. But when I import pygrib I'm getting a ModuleNotFoundError: No module named 'pygrib' error. Is there something I have to do to activate the package? I was under the impression it would be good to go when I ran the conda-forge command.

# packages in environment at /Users/maxcaudle/anaconda3/envs/grib:
#
appnope                   0.1.0                     <pip>
backcall                  0.1.0                     <pip>
bzip2                     1.0.6                         1    conda-forge
ca-certificates           2018.4.16                     0    conda-forge
certifi                   2018.4.16                py35_0    conda-forge
curl                      7.61.0               h93b3f91_1    conda-forge
decorator                 4.3.0                     <pip>
ecmwf_grib                1.27.0               h0cee55e_1    conda-forge
hdf4                      4.2.13                        0    conda-forge
hdf5                      1.10.2               hc401514_1    conda-forge
intel-openmp              2018.0.3                      0
ipython                   6.5.0                     <pip>
ipython-genutils          0.2.0                     <pip>
jasper                    1.900.1                       4    conda-forge
jedi                      0.12.1                    <pip>
jpeg                      9c                   h470a237_0    conda-forge
krb5                      1.14.6                        0    conda-forge
libcxx                    4.0.1                h579ed51_0
libcxxabi                 4.0.1                hebd6815_0
libedit                   3.1.20170329         hb402a30_2
libffi                    3.2.1                h475c297_4
libgfortran               3.0.1                h93005f0_2
libnetcdf                 4.6.1                h039f2a5_4    conda-forge
libopenblas               0.2.20               hdc02c5d_7
libpng                    1.6.35               ha92aebf_0    conda-forge
libssh2                   1.8.0                h5b517e9_2    conda-forge
mkl                       2018.0.3                      1
mkl_fft                   1.0.5                    py35_0    conda-forge
mkl_random                1.0.1                    py35_0    conda-forge
ncurses                   6.1                  h0a44026_0
numpy                     1.14.3           py35h9bb19eb_2
numpy-base                1.14.3           py35h7ef55bc_1
openssl                   1.0.2o               h470a237_1    conda-forge
parso                     0.3.1                     <pip>
pexpect                   4.6.0                     <pip>
pickleshare               0.7.4                     <pip>
pip                       18.0                     py35_1    conda-forge
prompt-toolkit            1.0.15                    <pip>
ptyprocess                0.6.0                     <pip>
Pygments                  2.2.0                     <pip>
pygrib                    2.0.1                    py35_3    conda-forge
pyproj                    1.9.5.1                  py35_0    conda-forge
python                    3.5.5                h0a44026_3
readline                  7.0                  hc1231fa_4
setuptools                40.0.0                   py35_1    conda-forge
simplegeneric             0.8.1                     <pip>
six                       1.11.0                    <pip>
sqlite                    3.24.0               ha441bb4_0
tk                        8.6.7                h35a86e2_3
traitlets                 4.3.2                     <pip>
wcwidth                   0.1.7                     <pip>
wheel                     0.31.1                   py35_1    conda-forge
xz                        5.2.4                h1de35cc_4
zlib                      1.2.11               hf3cbc9b_2

Solution

  • Have you tried pip? If you import it via IDLE, but installed it via conda, it won't work. If you want a specific version, download the tarball (.tar) and set it up your self.

    Then again, the import name may be different.