Hi,
I’m trying to install pyCRTM on my linux maching. I have successfully installed CRTMv2.4.0. I’m running into a problem with the following line of code that is part of the sequence of commands executed by “python3 setup.py install”:
/home/dostalek/miniconda3/envs/pycrtm_env/bin/f2py -m pycrtm -h /home/dostalek/code/crtm/pycrtm/_skbuild/linux-x86_64-3.9/cmake-build/pycrtm.pyf /home/dostalek/code/crtm/pycrtm/pycrtm.f90 /home/dostalek/code/crtm/crtm_2.4.0/src/Build/crtm_v2.4.0-alpha/lib//libcrtm.a --overwrite-signature
Since pycrtm and pycrtm.pyf are output files, I’m assuming the problem is in pycrtm.f90 or in libcrtm.a. The file libcrtm.a is of course created by the CRTM install itself. Here’s the output of the command:
Reading fortran codes…
Reading file ‘/home/dostalek/code/crtm/pycrtm/pycrtm.f90’ (format:free)
Traceback (most recent call last):
File “/home/dostalek/miniconda3/envs/pycrtm_env/bin/f2py”, line 10, in
sys.exit(main())
File “/home/dostalek/miniconda3/envs/pycrtm_env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py”, line 768, in main
run_main(sys.argv[1:])
File “/home/dostalek/miniconda3/envs/pycrtm_env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py”, line 463, in run_main
postlist = callcrackfortran(files, options)
File “/home/dostalek/miniconda3/envs/pycrtm_env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py”, line 347, in callcrackfortran
postlist = crackfortran.crackfortran(files)
File “/home/dostalek/miniconda3/envs/pycrtm_env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py”, line 3531, in crackfortran
readfortrancode(files, crackline)
File “/home/dostalek/miniconda3/envs/pycrtm_env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py”, line 392, in readfortrancode
l = fin.readline()
File “/home/dostalek/miniconda3/envs/pycrtm_env/lib/python3.9/fileinput.py”, line 305, in readline
line = self._readline()
File “/home/dostalek/miniconda3/envs/pycrtm_env/lib/python3.9/fileinput.py”, line 365, in _readline
self._file = self._openhook(self._filename, self._mode)
File “/home/dostalek/miniconda3/envs/pycrtm_env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py”, line 313, in openhook
encoding = charset_normalizer.from_path(filename).best().encoding
AttributeError: ‘NoneType’ object has no attribute ‘encoding’
Even though it is obvious, I will write explicitly that any help is appreciated.
Jack