Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Error on Mac OS-X with 1.12.0 #47

Closed
csadorf opened this issue Jan 19, 2017 · 17 comments
Closed

Import Error on Mac OS-X with 1.12.0 #47

csadorf opened this issue Jan 19, 2017 · 17 comments

Comments

@csadorf
Copy link

csadorf commented Jan 19, 2017

After installing the latest version I get the following error on importing the package:

  File "/Users/csadorf/miniconda3/envs/numpy/lib/python3.6/site-packages/numpy/core/__init__.py", line 16, in <module>
    from . import multiarray
ImportError: dlopen(/Users/csadorf/miniconda3/envs/numpy/lib/python3.6/site-packages/numpy/core/multiarray.cpython-36m-darwin.so, 2): Library not loaded: @rpath/./libgfortran.3.dylib
  Referenced from: /Users/csadorf/miniconda3/envs/numpy/lib/libopenblasp-r0.2.19.dylib
  Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/csadorf/miniconda3/envs/numpy/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/Users/csadorf/miniconda3/envs/numpy/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/Users/csadorf/miniconda3/envs/numpy/lib/python3.6/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/Users/csadorf/miniconda3/envs/numpy/lib/python3.6/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/Users/csadorf/miniconda3/envs/numpy/lib/python3.6/site-packages/numpy/core/__init__.py", line 24, in <module>
    raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.
(numpy) $ conda info
Using Anaconda API: https://api.anaconda.org
Current conda install:

             platform : osx-64
        conda version : 4.0.11
  conda-build version : not installed
       python version : 3.5.2.final.0
     requests version : 2.11.1
     root environment : /Users/csadorf/miniconda3  (writable)
  default environment : /Users/csadorf/miniconda3/envs/numpy
     envs directories : /Users/csadorf/miniconda3/envs
        package cache : /Users/csadorf/miniconda3/pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/osx-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/osx-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
                        https://conda.anaconda.org/conda-forge/osx-64/
                        https://conda.anaconda.org/conda-forge/noarch/
                        https://conda.anaconda.org/glotzer/osx-64/
                        https://conda.anaconda.org/glotzer/noarch/
                        file:///nfs/glotzer/software/conda-private/osx-64/
                        file:///nfs/glotzer/software/conda-private/noarch/
          config file : /Users/csadorf/.condarc
    is foreign system : False
(numpy) $ conda list
# packages in environment at /Users/csadorf/miniconda3/envs/numpy:
#
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
blas                      1.1                    openblas    conda-forge
certifi                   2016.9.26                py36_0    conda-forge
numpy                     1.12.0          py36_blas_openblas_200  [blas_openblas]  conda-forge
openblas                  0.2.19                        0    conda-forge
openssl                   1.0.2j                        0    defaults
pip                       9.0.1                    py36_1    defaults
python                    3.6.0                         1    conda-forge
readline                  6.2                           2    defaults
setuptools                32.3.1                   py36_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        1    conda-forge
wheel                     0.29.0                   py36_0    defaults
xz                        5.2.2                         1    defaults
zlib                      1.2.8                         3    conda-forge
@csadorf
Copy link
Author

csadorf commented Jan 19, 2017

So I think I was able to determine that the issue only occurs when the defaults channel has a higher priority than conda-forge.

So I assume that is not a supported conda configuration?

@jakirkham
Copy link
Member

Correct, conda-forge needs to be higher priority than defaults for things to work. It is also the configuration used for building and testing here.

@jjhelmus
Copy link
Contributor

There does not appear to be a libgfortan package installed in the environment even though openblas declares it as a requirement.

Note that the numpy, openblas and the libgfortran packages in the defaults and conda-forge channels are not interchangeable. All three packages should be installed from the same channel, mixing and matching them can results in errors like this.

@laventura
Copy link

Hello --

Is the problem above resolved?? I'm kinda stuck. Appreciate any pointers! Thanks!

I installed a new conda environment called tfk-py35 (with py35) on Mac OS X 10.11.6 - and I get the same error that was listed above.

 tfk-py35 ▶ ~ ▶ $ ▶ python
Python 3.5.3 | packaged by conda-forge | (default, May 12 2017, 15:35:12)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
Traceback (most recent call last):
  File "/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/numpy/core/__init__.py", line 16, in <module>
    from . import multiarray
ImportError: dlopen(/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/numpy/core/multiarray.cpython-35m-darwin.so, 2): Library not loaded: @rpath/libgfortran.3.dylib
  Referenced from: /Users/aa/Developer/miniconda/envs/tfk-py35/lib/libopenblasp-r0.2.19.dylib
  Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/scipy/__init__.py", line 61, in <module>
    from numpy import show_config as show_numpy_config
  File "/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/numpy/core/__init__.py", line 26, in <module>
    raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: dlopen(/Users/aa/Developer/miniconda/envs/tfk-py35/lib/python3.5/site-packages/numpy/core/multiarray.cpython-35m-darwin.so, 2): Library not loaded: @rpath/libgfortran.3.dylib
  Referenced from: /Users/aa/Developer/miniconda/envs/tfk-py35/lib/libopenblasp-r0.2.19.dylib
  Reason: image not found

Here's the conda info:

 ~ ▶ $ ▶ conda info
Using Anaconda Cloud api site https://api.anaconda.org
Current conda install:

             platform : osx-64
        conda version : 4.0.5
  conda-build version : not installed
       python version : 2.7.11.final.0
     requests version : 2.9.1
     root environment : /Users/aa/Developer/miniconda  (writable)
  default environment : /Users/aa/Developer/miniconda
     envs directories : /Users/aa/Developer/miniconda/envs
        package cache : /Users/aa/Developer/miniconda/pkgs
         channel URLs : https://conda.anaconda.org/conda-forge/osx-64/
                        https://conda.anaconda.org/conda-forge/noarch/
                        https://repo.continuum.io/pkgs/free/osx-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/osx-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : /Users/aa/.condarc
    is foreign system : False

Here are the packages installed in the env tfk-py35 below:

 tfk-py35 ▶ ~ ▶ $ ▶ conda list
# packages in environment at /Users/aa/Developer/miniconda/envs/tfk-py35:
#
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
blas                      1.1                    openblas    conda-forge
ca-certificates           2017.4.17                     0    conda-forge
certifi                   2017.4.17                py35_0    conda-forge
libgfortran               3.0.0                         1    defaults
numpy                     1.13.1          py35_blas_openblas_200  [blas_openblas]  conda-forge
openblas                  0.2.19                        2    conda-forge
openssl                   1.0.2l                        0    conda-forge
pip                       9.0.1                    py35_1    defaults
python                    3.5.3                         3    conda-forge
readline                  6.2                           2    <unknown>
scipy                     0.19.1          np113py35_blas_openblas_200  [blas_openblas]  conda-forge
setuptools                33.1.1                   py35_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        1    conda-forge
wheel                     0.29.0                   py35_0    defaults
xz                        5.2.2                         1    defaults
zlib                      1.2.11                        0    conda-forge
 tfk-py35 ▶ ~ ▶ $ ▶

Here's how the env was created:

 ~ ▶ $ ▶ conda create --name tfk-py35 python=3.5 numpy scipy
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ......
Solving package specifications: .........

Package plan for installation in environment /Users/aa/Developer/miniconda/envs/tfk-py35:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    scipy-0.19.1               |np113py35_blas_openblas_200        15.1 MB

The following NEW packages will be INSTALLED:

    blas:            1.1-openblas
    ca-certificates: 2017.4.17-0
    certifi:         2017.4.17-py35_0
    libgfortran:     3.0.0-1
    numpy:           1.13.1-py35_blas_openblas_200      [blas_openblas]
    openblas:        0.2.19-2
    openssl:         1.0.2l-0
    pip:             9.0.1-py35_1
    python:          3.5.3-3
    readline:        6.2-2
    scipy:           0.19.1-np113py35_blas_openblas_200 [blas_openblas]
    setuptools:      33.1.1-py35_0
    sqlite:          3.13.0-1
    tk:              8.5.19-1
    wheel:           0.29.0-py35_0
    xz:              5.2.2-1
    zlib:            1.2.11-0

Proceed ([y]/n)? y

Fetching packages ...
scipy-0.19.1-n 100% |#########################################################################################| Time: 0:00:02   6.54 MB/s
Extracting packages ...
[      COMPLETE      ]|############################################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|############################################################################################################| 100%
#
# To activate this environment, use:
# $ source activate tfk-py35
#
# To deactivate this environment, use:
# $ source deactivate
#
 ~ ▶ $ ▶ source activate tfk-py35
discarding /Users/aa/Developer/miniconda/bin from PATH
prepending /Users/aa/Developer/miniconda/envs/tfk-py35/bin to PATH
 tfk-py35 ▶ ~ ▶ $ ▶ python -V
Python 3.5.3
 tfk-py35 ▶ ~ ▶ $ ▶ conda list
# packages in environment at /Users/aa/Developer/miniconda/envs/tfk-py35:
#
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
blas                      1.1                    openblas    conda-forge
ca-certificates           2017.4.17                     0    conda-forge
certifi                   2017.4.17                py35_0    conda-forge
libgfortran               3.0.0                         1    defaults
numpy                     1.13.1          py35_blas_openblas_200  [blas_openblas]  conda-forge
openblas                  0.2.19                        2    conda-forge
openssl                   1.0.2l                        0    conda-forge
pip                       9.0.1                    py35_1    defaults
python                    3.5.3                         3    conda-forge
readline                  6.2                           2    <unknown>
scipy                     0.19.1          np113py35_blas_openblas_200  [blas_openblas]  conda-forge
setuptools                33.1.1                   py35_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        1    conda-forge
wheel                     0.29.0                   py35_0    defaults
xz                        5.2.2                         1    defaults
zlib                      1.2.11                        0    conda-forge

@csadorf
Copy link
Author

csadorf commented Jul 14, 2017

When I created this issue having conda-forge prioritized was an immediate solution. But since then, I have tried again to prioritize defaults and haven't had any issues with that lately.

@jakirkham
Copy link
Member

Again that is not a supported configuration. So while you can use it, it remains unsupported. Issues stemming from the wrong channel ordering will be closed out.

@csadorf
Copy link
Author

csadorf commented Jul 14, 2017

Again that is not a supported configuration. So while you can use it, it remains unsupported. Issues stemming from the wrong channel ordering will be closed out.

That's perfectly fine with me. I just wanted to let @laventura know that this particular problem is currently no issue for me.

@laventura
Copy link

I have this in ~/.condarc, (which I haven't touched). I'm assuming this is the normal config.

 tfk-py35 ▶ ~ ▶ $ ▶ more ~/.condarc
channels:
  - conda-forge
  - defaults
 tfk-py35 ▶ ~ ▶ $ ▶

SO - as it stands -- what's the solution for this import numpy error that has a problem with @rpath/libgfortran.3.dylib? Any other avenues to try out? Thanks!

@jakirkham
Copy link
Member

It looks like you got libgfortran from defaults though. Not sure why though. 😕 Could you please try forcing it to install the libgfortran from conda-forge?

@laventura
Copy link

@jakirkham I tried re-installing libgfortran from conda-forge.

See what happens:

  1. It still says: libgfortran is from defaults
  2. In the miniconda/pkgs directory, there are TWO directories: libgfortran-3.0.0-0 and libgfortran-3.0.0-1. The latter one has a missing libgfortran3.dylib

Current conda list:

 tfk-py35 ▶ ~ ▶ Developer ❯ … ❯ envs ❯ tfk-py35 ❯ lib ▶ $ ▶ conda list
# packages in environment at /Users/aa/Developer/miniconda/envs/tfk-py35:
#
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
blas                      1.1                    openblas    conda-forge
ca-certificates           2017.4.17                     0    conda-forge
certifi                   2017.4.17                py35_0    conda-forge
libgfortran               3.0.0                         1    defaults
numpy                     1.13.1          py35_blas_openblas_200  [blas_openblas]  conda-forge
openblas                  0.2.19                        2    conda-forge
openssl                   1.0.2l                        0    conda-forge
pip                       9.0.1                    py35_1    defaults
python                    3.5.3                         3    conda-forge
readline                  6.2                           2    <unknown>
scipy                     0.19.1          np113py35_blas_openblas_200  [blas_openblas]  conda-forge
setuptools                33.1.1                   py35_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        1    conda-forge
wheel                     0.29.0                   py35_0    defaults
xz                        5.2.2                         1    defaults
zlib                      1.2.11                        0    conda-forge

Now re-installing libgfortran:

 tfk-py35 ▶ ~ ▶ Developer ❯ … ❯ envs ❯ tfk-py35 ❯ lib ▶ $ ▶ conda install -c conda-forge -f libgfortran
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ........
Solving package specifications: .........

Package plan for installation in environment /Users/aa/Developer/miniconda/envs/tfk-py35:

The following packages will be UPDATED:

    libgfortran: 3.0.0-1 --> 3.0.0-1

Proceed ([y]/n)? y

[      COMPLETE      ]|############################################################################################################| 100%
Extracting packages ...
[      COMPLETE      ]|############################################################################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|############################################################################################################| 100%
Linking packages ...
[      COMPLETE      ]|############################################################################################################| 100%
 tfk-py35 ▶ ~ ▶ Developer ❯ … ❯ envs ❯ tfk-py35 ❯ lib ▶ $ ▶

NEW conda list

 tfk-py35 ▶ ~ ▶ Developer ❯ … ❯ envs ❯ tfk-py35 ❯ lib ▶ $ ▶ conda list
# packages in environment at /Users/aa/Developer/miniconda/envs/tfk-py35:
#
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
blas                      1.1                    openblas    conda-forge
ca-certificates           2017.4.17                     0    conda-forge
certifi                   2017.4.17                py35_0    conda-forge
libgfortran               3.0.0                         1    defaults
numpy                     1.13.1          py35_blas_openblas_200  [blas_openblas]  conda-forge
openblas                  0.2.19                        2    conda-forge
openssl                   1.0.2l                        0    conda-forge
pip                       9.0.1                    py35_1    defaults
python                    3.5.3                         3    conda-forge
readline                  6.2                           2    <unknown>
scipy                     0.19.1          np113py35_blas_openblas_200  [blas_openblas]  conda-forge
setuptools                33.1.1                   py35_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        1    conda-forge
wheel                     0.29.0                   py35_0    defaults
xz                        5.2.2                         1    defaults
zlib                      1.2.11                        0    conda-forge
 tfk-py35 ▶ ~ ▶ Developer ❯ … ❯ envs ❯ tfk-py35 ❯ lib ▶ $ ▶

When I go:
** Now navigate to /Users/aa/Developer/miniconda/pkgs where the pkgs are:**

 ~ ▶ Developer ❯ miniconda ❯ pkgs ▶ $ ▶ ls -l *fortran*
-rw-r--r--  1 aa  staff  476327 Jan 13 16:59 libgfortran-3.0.0-0.tar.bz2
-rw-r--r--  1 aa  staff  220995 Jul 13 23:15 libgfortran-3.0.0-1.tar.bz2

libgfortran-3.0.0-0:
total 0
drwxr-xr-x  6 aa  staff  204 Jan 13 17:00 info
drwxr-xr-x  9 aa  staff  306 Jan 13 17:00 lib

libgfortran-3.0.0-1:
total 0
drwxr-xr-x  8 aa  staff  272 Jul 14 10:49 info
drwxr-xr-x  3 aa  staff  102 Jul 14 10:49 lib

Inside libgfortran-3.0.0.-0, here are all the files, which clearly shows libgfortran.3.dylib:

 ~ ▶ Developer ❯ miniconda ❯ pkgs ▶ $ ▶ ls -lR libgfortran-3.0.0-0
total 0
drwxr-xr-x  6 aa  staff  204 Jan 13 17:00 info
drwxr-xr-x  9 aa  staff  306 Jan 13 17:00 lib

libgfortran-3.0.0-0/info:
total 24
-rw-r--r--  1 aa  staff   168 Jul 13  2016 files
-rw-r--r--  1 aa  staff   229 Jul 13  2016 index.json
drwxr-xr-x  3 aa  staff   102 Jan 13 17:00 recipe
-rw-r--r--  1 aa  staff  1498 Jul 13  2016 recipe.json

libgfortran-3.0.0-0/info/recipe:
total 8
-rw-r--r--  1 aa  staff  2148 Jul 13  2016 meta.yaml

libgfortran-3.0.0-0/lib:
total 3128
-rw-r--r--  2 aa  staff   130336 Sep 18  2015 libgcc_s.1.dylib
lrwxr-xr-x  1 aa  staff       16 Jan 13 17:00 libgcc_s_ppc64.1.dylib -> libgcc_s.1.dylib
lrwxr-xr-x  1 aa  staff       16 Jan 13 17:00 libgcc_s_x86_64.1.dylib -> libgcc_s.1.dylib
-rwxr-xr-x  2 aa  staff  1220864 Sep 18  2015 libgfortran.3.dylib
lrwxr-xr-x  1 aa  staff       19 Jan 13 17:00 libgfortran.dylib -> libgfortran.3.dylib
-rwxr-xr-x  2 aa  staff   228048 Sep 18  2015 libquadmath.0.dylib
lrwxr-xr-x  1 aa  staff       19 Jan 13 17:00 libquadmath.dylib -> libquadmath.0.dylib

But inside libgfortran-3.0.0-1, the libgfortran.3.dylib is missing!!

~ ▶ Developer ❯ miniconda ❯ pkgs ▶ $ ▶ ls -lR libgfortran-3.0.0-1
total 0
drwxr-xr-x  8 aa  staff  272 Jul 14 10:49 info
drwxr-xr-x  3 aa  staff  102 Jul 14 10:49 lib

libgfortran-3.0.0-1/info:
total 88
-rw-r--r--  1 aa  staff  12693 Jan 24 17:42 about.json
-rw-r--r--  1 aa  staff     24 Jan 24 17:42 files
-rw-r--r--  1 aa  staff    195 Jan 24 17:42 index.json
-rw-r--r--  1 aa  staff    242 Jan 24 17:42 paths.json
-rw-r--r--  1 aa  staff    342 Jan 24 17:42 platform
-rw-r--r--  1 aa  staff  10240 Jan 24 17:42 recipe.tar

libgfortran-3.0.0-1/lib:
total 2008
-rwxrwxr-x  2 aa  staff  1027349 Jan 24 17:42 libgfortran.2.dylib
 ~ ▶ Developer ❯ miniconda ❯ pkgs ▶ $ ▶

Am I doing something wrong?? Am I missing something small and stupid somewhere?
Appreciate your help! Thanks!

@laventura
Copy link

@jakirkham Well, I looked into the bz2 archives for libgfortran-3.0.0-1.

Looks like it is missing a whole bunch of files.

See here for comparison:

 tmp ▶ $ ▶ tar tvf libgfortran-3.0.0-0.tar
-rw-r--r--  0 travis staff     168 Jul 13  2016 info/files
-rw-r--r--  0 travis staff     229 Jul 13  2016 info/index.json
-rw-r--r--  0 travis staff    1498 Jul 13  2016 info/recipe.json
-rw-r--r--  0 travis staff    2148 Jul 13  2016 info/recipe/meta.yaml
-rw-r--r--  0 travis staff  130336 Sep 18  2015 lib/libgcc_s.1.dylib
lrwxr-xr-x  0 travis staff       0 Jul 13  2016 lib/libgcc_s_ppc64.1.dylib -> libgcc_s.1.dylib
lrwxr-xr-x  0 travis staff       0 Jul 13  2016 lib/libgcc_s_x86_64.1.dylib -> libgcc_s.1.dylib
-rwxr-xr-x  0 travis staff 1220864 Sep 18  2015 lib/libgfortran.3.dylib
lrwxr-xr-x  0 travis staff       0 Jul 13  2016 lib/libgfortran.dylib -> libgfortran.3.dylib
-rwxr-xr-x  0 travis staff  228048 Sep 18  2015 lib/libquadmath.0.dylib
lrwxr-xr-x  0 travis staff       0 Jul 13  2016 lib/libquadmath.dylib -> libquadmath.0.dylib
 tmp ▶ $ ▶
 tmp ▶ $ ▶ tar tvf libgfortran-3.0.0-1.tar
-rw-r--r--  0 ilan   wheel   12693 Jan 24 17:42 info/about.json
-rw-r--r--  0 ilan   wheel      24 Jan 24 17:42 info/files
-rw-r--r--  0 ilan   wheel     195 Jan 24 17:42 info/index.json
-rw-r--r--  0 ilan   wheel     242 Jan 24 17:42 info/paths.json
-rw-r--r--  0 ilan   wheel     342 Jan 24 17:42 info/platform
-rw-r--r--  0 ilan   wheel   10240 Jan 24 17:42 info/recipe.tar
-rwxrwxr-x  0 ilan   wheel 1027349 Jan 24 17:42 lib/libgfortran.2.dylib
 tmp ▶ $ ▶

What's the best approach to get the latest (and correct) libgfortran files? Thanks!

@jakirkham
Copy link
Member

There is no libgfortran-3.0.0-1 in conda-forge. That is from defaults. It is bad that the package doesn't seem to have a version that matches the SONAME and has missing file. Not sure why that is the case. 😕 In any event, that would be an issue to raise at anaconda-recipes.

There are a few ways to solve this. First given the channel order that you showed above with conda-forge as the highest priority, running conda update --all or conda update libgfortran should fix it. May also try adding the argument -c conda-forge. If that doesn't work, you could try conda install libgfortran=3.0.0=0 as this version/build number is unique to conda-forge.

@laventura
Copy link

@jakirkham Ok great! Something worked!

I tried conda update -c conda-forge --all but that did nothing.

So finally conda install libgfortran=3.0.0=0 worked!!
Phew. Spent 10+ hours since last night trying to sort this out. Thanks for your help!! 👍👍

Now I can proceed with installing other packages 😑

@jakirkham
Copy link
Member

Glad to hear it worked. Sorry to hear it's been so much trouble.

It's a bit strange conda didn't respect channel priority, which version of conda are you using?

Yeah, I know that feeling. Hopefully the rest are not so painful.

megies added a commit to obspy/anaconda-installers that referenced this issue Jul 15, 2017
hopefully this will fix the build on osx which seems to suffer from the
problems described in conda-forge/numpy-feedstock#47
@quantshah
Copy link

quantshah commented Aug 3, 2017

Well, this keeps propping up for me too when I update Keras. Updating everything from the conda-forge channel and elevating the conda-forge channel to the highest priority does not solve it.

conda update -c conda-forge --all
conda config --add channels conda-forge
add_anaconda_token: True
add_pip_as_python_dependency: True
allow_non_channel_urls: True
allow_softlinks: True
always_copy: False
always_softlink: False
always_yes: False
anaconda_upload: None
auto_update_conda: True
changeps1: True
channel_alias: https://conda.anaconda.org
channel_priority: True
channels:
  - conda-forge
  - defaults

I still have this error

ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: dlopen(/Users/shahnawaz/miniconda3/lib/python3.5/site-packages/numpy/core/multiarray.cpython-35m-darwin.so, 2): Library not loaded: @rpath/libgfortran.3.dylib
  Referenced from: /Users/shahnawaz/miniconda3/lib/libopenblasp-r0.2.19.dylib
  Reason: image not found

@quantshah
Copy link

@jakirkham Thanks for the libgfortran fix. Everything works now ! I was just going nuts for the last few days with this issue. It happened after I updated libgfortran some time back.

@jakirkham
Copy link
Member

Probably someone should raise a conda issue if channel priority is not being respected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants