sczesla / PyAstronomy

A collection of astronomy-related routines in Python
152 stars 35 forks source link

Installing PyAstronomy with extensions under python 3 #38

Closed nonZero closed 6 years ago

nonZero commented 6 years ago

Hi!

When trying to install PyAstronomy with python 3.6 and Arch linux, the following appears:

$ python setup.py --with-ext install 
/home/user/.virtualenvs/myvenv/lib/python3.6/site-packages/setuptools/dist.py:398: UserWarning: Normalizing '0.13.0beta' to '0.13.0b0'
  normalized_version,
running install
running bdist_egg
running egg_info
writing PyAstronomy.egg-info/PKG-INFO
writing dependency_links to PyAstronomy.egg-info/dependency_links.txt
writing requirements to PyAstronomy.egg-info/requires.txt
writing top-level names to PyAstronomy.egg-info/top_level.txt
reading manifest file 'PyAstronomy.egg-info/SOURCES.txt'
writing manifest file 'PyAstronomy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'PyAstronomy.modelSuite.XTran.forTrans.occultnl' extension
error: unknown file type '.pyf' (from 'src/modelSuite/XTran/forTrans/occultnl.pyf')

The documentation does not supply any help regarding what is needed to suppress this. (Does it require gcc-fortran?)

sczesla commented 6 years ago

Hi,

these (.pyf) files should be handled by f2py, which is a part of numpy. Could you check whether f2py is available and numpy installed? Honestly, I am currently not sure whether an installation of gcc-fortran is required.

Skipping the --with-ext option would skip the compilation. Obvious disadvantage is that these transit models cannot be used.

Cheers

nonZero commented 6 years ago

Compiling fortran files (.f with matching .pyf) requires a fortran compiler.