我刚刚按照如下所示在Ubuntu Server 18.04上安装了gfortran-9:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gfortran-9
我已经能够通过编译并运行一个简单的'Hello World'程序来确认gfortran-9是否正常工作。
我现在正在尝试按如下方式安装PyPROSAIL:
sudo -H pip3 install pyprosail
...但我收到以下错误:
error: extension 'PyPROSAIL._prosail_model' has Fortran sources but no Fortran compiler found
gfortran-9 --version
向我显示以下内容:
GNU Fortran (Ubuntu 9.2.1-17ubuntu1~18.04.1) 9.2.1 20191102
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
whereis gfortran-9
向我显示以下内容:
gfortran-9: /usr/bin/gfortran-9 /usr/share/man/man1/gfortran-9.1.gz
为什么显然找不到gfortran-9?我是否需要在某处手动设置gfortran-9的路径?
[如果其他人遇到相同的问题,我可以通过安装其他Fortran编译器-gfortran
来解决此问题:
sudo apt-get install gfortran