Problem with installing QML on MAC
yghadar opened this issue · 16 comments
I have Mac with Sierra OS. I have installed BLAS, LAPACK as well as ASE and gnu compilers from macport. When I try python setup.py install I get:
resetting extension 'farad_kernels' language from '/opt/local/bin/gfortran-mp-7' to 'f77'.
resetting extension 'fcho_solve' language from '/opt/local/bin/gfortran-mp-7' to 'f77'.
resetting extension 'fdistance' language from '/opt/local/bin/gfortran-mp-7' to 'f77'.
resetting extension 'fkernels' language from '/opt/local/bin/gfortran-mp-7' to 'f77'.
resetting extension 'frepresentations' language from '/opt/local/bin/gfortran-mp-7' to 'f77'.
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize NAGFCompiler
customize AbsoftFCompiler
Could not locate executable f90
Could not locate executable f77
customize IBMFCompiler
Could not locate executable xlf90
Could not locate executable xlf
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize GnuFCompiler
Could not locate executable g77
customize G95FCompiler
Could not locate executable g95
customize PGroupFCompiler
Could not locate executable pgfortran
don't know how to compile Fortran code on platform 'posix'
warning: build_ext: f77_compiler=None is not available.
building 'farad_kernels' extension
error: extension 'farad_kernels' has Fortran sources but no Fortran compiler found
bash-3.2$
I have give the full path in setup.py for FORTRAN = "/opt/local/bin/gfortran-mp-7"
Please let me know what I need to do to resolve the issue.
The FORTRAN variable should be "f90" and is used to tell setuptools the fortran version - you should NOT change this variable in setup.py.
You should not change anything in setup.py.
Please follow the instructions here: http://www.qmlcode.org/installation.html
Feel free to open another issue if the instructions do not work.
Ok, are you able to install qml via pip (simply "pip install qml")? Or does that yield the same error?
Could you post the output from the following command:
pip install git+https://github.com/qmlcode/qml@develop --user -U
Looks like a problem with your f compiler - what happens if you write:
which gfortran
Also try updating your gcc:
# Update brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install GCC
brew install gcc
I think I understand the root of your problem now. This seems to be a limitations in python's setuptools, that it only looks for execuatbles named gfortran
, but it should be possible to install a package regardless.
Can you run the following command:
python setup.py build --help-fcompiler
This should give you a list of all f-compilers can find. I assume the list will be empty.
Looks like you need to set up a symlink to gcc and gfortran, there are instructions here:
https://stackoverflow.com/questions/8361002/how-to-use-the-gcc-installed-in-macports/8372496#8372496
Once you setup the symlinks, I think setup.py should be able to find the right gfortran. Let me know how it goes!
Based on
File "qml/__init__.py", line 37, in <module>
it looks like you were probably in the source folder, which you cloned from github. In this case the qml/
folder only contains the source (it is not where setup.py places the compiled code), but this is the folder that python searches first.
Can you try from another folder?
Difficult to say what your problem is here. But it looks like a problem with your environments. Really difficult to say from my end - you could try installing gcc from homebrew maybe.