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

Issue with no finding shared object libgfortran.so.5 #91

Open
armozhdehi opened this issue Mar 5, 2023 · 1 comment
Open

Issue with no finding shared object libgfortran.so.5 #91

armozhdehi opened this issue Mar 5, 2023 · 1 comment

Comments

@armozhdehi
Copy link

I am trying to load numpy after installing it but I keep getting the following error. Could anyone please help me with that?
I already tried downgrading numpy upgrading scipy non worked, and I am not sure what can I do without sudoer permission

Thanks in advance

ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.8 from "/gpfs/share/opt/spack/opt/spack/linux-centos7-skylake_avx512/gcc-9.2.0/miniconda3-4.8.2-sbqd2xuujanbjetlisyadekq4izf3lfw/bin/python"
  • The NumPy version is: "1.23.0"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libgfortran.so.5: cannot open shared object file: No such file or directory

@nrcfieldsa
Copy link

nrcfieldsa commented Mar 16, 2023

Please can you attempt:

$ . activate test
(test) $ pip list
(test) $ pip uninstall numpy
(test) $ conda install libgfortran5
(test) $ conda install numpy

The problem may be that the install of numpy was through pip instead of conda, and thus that numpy used is from ComputeCanada wheelhouse. Using a mixture of pip and conda commands can lead to problematic outcomes with miniconda/anaconda environments.

However, if you do use pip to install python packages in your conda env - it is suggested to use conda for all common python requirements and then use pip at the end, to install any remaining packages not found in conda-forge.

When I try to reproduce the issue, I get a missing library and segfault after doing: pip install numpy. However, when I uninstall numpy from pip and then install it using: conda install numpy I can import numpy in python 3.8 with-out issue and it finds all the run-time libs.

It is also possible you can use the following first, prior to activating your env to avoid CC CVMFS dependencies:

$ echo base > ~/.config/nrc_profile

Then login again in another window:

$ module load miniconda3

When you want to use CC CVMFS again, simply remove the nrc_profile file.

$ rm ~/.config/nrc_profile

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

2 participants