Closed jellium closed 8 years ago
Hi Jellium
In order to (hopefully) help you out I need to know the following things:
sh f2py.sh
from the py_gmm/py_gmm
folder.gmm_py.cpython-27m.so
or gmm_py.cpython-34m.so
somewhere, and probably in /usr/local/lib/python2.7/dist-packages/py_gmm-0.1-py2.7.egg/py_gmm/
or /usr/local/lib/python3.4/dist-packages/py_gmm-0.01-py3.4.egg/py_gmm/
gmm_py.cpython-34m.so
must be reachable from the ipython notebook, therefore you should change the line sys.path.append('../')
to point to the folder where the shared library is found.Hopefully one of the above suggestions should solve your problem
Best
Giovanni
Did any of my suggestions work?
Hi gevero, Thanks for the detailed reply.
I tried to reinstall the package by first compiling from the repo with sh f2py.sh
. Here is the end of the output where there seem to be an error related to the gmm_py.cpython-34.so
file:
...
gfortran:f90: kinds.f90
gfortran:f90: datatypes.f90
gfortran:f90: operators.f90
gfortran:f90: shared_data.f90
gfortran:f90: basicsubs.f90
gfortran:f90: gmmsubs.f90
gfortran:f90: sing_part.f90
gfortran:f90: vec_trans.f90
gfortran:f90: local_field.f90
gfortran:f90: linear_solver.f90
gfortran:f90: gmm_f2py_module.f90
compiling Fortran sources
Fortran f77 compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2
Fortran f90 compiler: /usr/bin/gfortran -O3 -fpic -m64 -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2
Fortran fix compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -O3 -fpic -m64 -fPIC -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2
compile options: '-I./tmp/src.linux-x86_64-3.4 -I/usr/local/lib/python3.4/dist-packages/numpy/core/include -I/usr/include/python3.4m -c'
extra options: '-J./tmp/ -I./tmp/'
gfortran:f90: tmp/src.linux-x86_64-3.4/gmm_py-f2pywrappers2.f90
/usr/bin/gfortran -Wall -g -Wall -g -shared -Wl,-gc-sections -Wl,-s ./tmp/tmp/src.linux-x86_64-3.4/gmm_pymodule.o ./tmp/tmp/src.linux-x86_64-3.4/fortranobject.o ./tmp/kinds.o ./tmp/datatypes.o ./tmp/operators.o ./tmp/shared_data.o ./tmp/basicsubs.o ./tmp/gmmsubs.o ./tmp/sing_part.o ./tmp/vec_trans.o ./tmp/local_field.o ./tmp/linear_solver.o ./tmp/gmm_f2py_module.o ./tmp/tmp/src.linux-x86_64-3.4/gmm_py-f2pywrappers2.o -lopenblas -lgfortran -o ./gmm_py.cpython-34m.so
/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall -g -Wall -g -shared -Wl,-gc-sections -Wl,-s ./tmp/tmp/src.linux-x86_64-3.4/gmm_pymodule.o ./tmp/tmp/src.linux-x86_64-3.4/fortranobject.o ./tmp/kinds.o ./tmp/datatypes.o ./tmp/operators.o ./tmp/shared_data.o ./tmp/basicsubs.o ./tmp/gmmsubs.o ./tmp/sing_part.o ./tmp/vec_trans.o ./tmp/local_field.o ./tmp/linear_solver.o ./tmp/gmm_f2py_module.o ./tmp/tmp/src.linux-x86_64-3.4/gmm_py-f2pywrappers2.o -lopenblas -lgfortran -o ./gmm_py.cpython-34m.so" failed with exit status 1
Also I can't find this library anywhere after compiling (which ends with this error) and installing via setup.py
.
Hi jellium
the error is the following
collect2: error: ld returned 1 exit status
/usr/bin/ld: cannot find -lopenblas
This means that the compiler cannot find the openblas
library. You are unable to find the gmm_py.cpython-34.so
file because the compilation failed, therefore the gmm_py.cpython-34.so
file was not created. A conda install openblas
command should be able to solve this problem.
Best
Giovanni
Hi @jellium In a couple of days I am going to close the issue if it's ok.
Hi Giovanni, Thanks for your answers, sorry I didn't answer back to you. I installed Openlabs and things worked as expected!
Regards
PS : message envoyé depuis mon smartphone Le 17 janv. 2016 20:53, "Giovanni Pellegrini" notifications@github.com a écrit :
Hi @jellium https://github.com/jellium In a couple of days I am going to close the issue if it's ok.
— Reply to this email directly or view it on GitHub https://github.com/gevero/py_gmm/issues/2#issuecomment-172371577.
After successful installation of the package on both Python 2.7 and 3.4, I cannot run properly the example notebook, obtaining the following error while running the first notebook cell (untitled Importing the libraries):
With Python 2.7:
With Python 3.4 (identical):
Regards,