mrkwjc / ffnet

Feed-forward neural network for python
GNU Lesser General Public License v3.0
12 stars 7 forks source link

Import error with gcc-8 #5

Closed Rhyst223 closed 3 months ago

Rhyst223 commented 5 years ago

I have been able to install ffnet fine but I cannot import it. import ffnet gives the error:

ImportError: dlopen(/usr/local/lib/python3.7/site-packages/ffnet/fortran/_ffnet.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgfortran.4.dylib
  Referenced from: /usr/local/lib/python3.7/site-packages/ffnet/fortran/_ffnet.cpython-37m-darwin.so
  Reason: image not found

Upon inspection it is because the path /usr/local/opt/gcc/lib/gcc/7 doesn't exist, with my latest gcc it is /usr/local/opt/gcc/lib/gcc/8 and even within that the file I imagine is the one needed is called libgfortran.5.dylib (libgfortran.4.dylib doesn't exist in the folder)

Is the current ffnet not compatible with gcc-8?

I am using macOS Mojave 10.14.3 and Python 3.7

mrkwjc commented 5 years ago

Your problem seems like if you have been installed binary version of ffnet compiled somwhere with gcc-7. Maybe you should download source and compile ffnet by yourself with:

python setup.py build
python setup.py install