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

Problem with installing QML on MAC #32

Closed
yghadar opened this issue Aug 29, 2017 · 16 comments
Closed

Problem with installing QML on MAC #32

yghadar opened this issue Aug 29, 2017 · 16 comments

Comments

@yghadar
Copy link

yghadar commented Aug 29, 2017

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.

@andersx
Copy link
Member

andersx commented Aug 30, 2017

The FORTRAN variable should be "f90" and is used to tell setuptools the fortran version - you should NOT change this variable in setup.py.

@andersx
Copy link
Member

andersx commented Aug 30, 2017

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.

@andersx andersx closed this as completed Aug 30, 2017
@yghadar
Copy link
Author

yghadar commented Aug 30, 2017 via email

@andersx
Copy link
Member

andersx commented Aug 30, 2017

Ok, are you able to install qml via pip (simply "pip install qml")? Or does that yield the same error?

@yghadar
Copy link
Author

yghadar commented Aug 30, 2017 via email

@andersx
Copy link
Member

andersx commented Aug 30, 2017

Could you post the output from the following command:

pip install git+https://github.com/qmlcode/qml@develop --user -U

@yghadar
Copy link
Author

yghadar commented Aug 30, 2017 via email

@andersx
Copy link
Member

andersx commented Aug 31, 2017

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

@yghadar
Copy link
Author

yghadar commented Aug 31, 2017 via email

@andersx
Copy link
Member

andersx commented Aug 31, 2017

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.

@yghadar
Copy link
Author

yghadar commented Aug 31, 2017 via email

@andersx
Copy link
Member

andersx commented Aug 31, 2017

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!

@yghadar
Copy link
Author

yghadar commented Aug 31, 2017 via email

@andersx
Copy link
Member

andersx commented Aug 31, 2017

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?

@yghadar
Copy link
Author

yghadar commented Aug 31, 2017 via email

@andersx
Copy link
Member

andersx commented Sep 4, 2017

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.

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