Hey François,
I have been installing the latest version of Polymer in my Linux system from the Forum. Unfortunately I am getting this error (given below) when executing the final make command.
Do you know how to fix this error? Awaiting your reply.
Best, Vishnu
(polymer) hypso@atmospheric-tower:~/Desktop/Polymer/polymer-v4.17beta2$ make
python setup.py build_ext --inplace
Compiling polymer/clut.pyx because it changed.
Compiling polymer/neldermead.pyx because it changed.
Compiling polymer/polymer_main.pyx because it changed.
Compiling polymer/water.pyx because it changed.
[1/4] Cythonizing polymer/clut.pyx
/home/hypso/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/hypso/Desktop/Polymer/polymer-v4.17beta2/polymer/clut.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
[2/4] Cythonizing polymer/neldermead.pyx
/home/hypso/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/hypso/Desktop/Polymer/polymer-v4.17beta2/polymer/neldermead.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
[3/4] Cythonizing polymer/polymer_main.pyx
/home/hypso/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/hypso/Desktop/Polymer/polymer-v4.17beta2/polymer/polymer_main.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
from libc.math cimport nan, exp, log, abs, sqrt, isnan
from cpython.exc cimport PyErr_CheckSignals
import pandas as pd
from pathlib import Path
from neldermead cimport NelderMeadMinimizer, dot
^
------------------------------------------------------------
polymer/polymer_main.pyx:10:0: 'neldermead.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from libc.math cimport nan, exp, log, abs, sqrt, isnan
from cpython.exc cimport PyErr_CheckSignals
import pandas as pd
from pathlib import Path
from neldermead cimport NelderMeadMinimizer, dot
^
------------------------------------------------------------
polymer/polymer_main.pyx:10:0: 'neldermead/NelderMeadMinimizer.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from libc.math cimport nan, exp, log, abs, sqrt, isnan
from cpython.exc cimport PyErr_CheckSignals
import pandas as pd
from pathlib import Path
from neldermead cimport NelderMeadMinimizer, dot
^
------------------------------------------------------------
polymer/polymer_main.pyx:10:0: 'neldermead/dot.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpython.exc cimport PyErr_CheckSignals
import pandas as pd
from pathlib import Path
from neldermead cimport NelderMeadMinimizer, dot
from water cimport WaterModel
^
------------------------------------------------------------
polymer/polymer_main.pyx:11:0: 'water.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from cpython.exc cimport PyErr_CheckSignals
import pandas as pd
from pathlib import Path
from neldermead cimport NelderMeadMinimizer, dot
from water cimport WaterModel
^
------------------------------------------------------------
polymer/polymer_main.pyx:11:0: 'water/WaterModel.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
'W_dR2_Rprime_noglint2': W_dR2_Rprime_noglint2,
'W_dR2_Rprime_noglint2_norm': W_dR2_Rprime_noglint2_norm,
'polymer_3_5': polymer_3_5,
}
cdef class F(NelderMeadMinimizer):
^
------------------------------------------------------------
polymer/polymer_main.pyx:39:13: First base of 'F' is not an extension type
Error compiling Cython file:
------------------------------------------------------------
...
cdef float[:] Rprime
cdef float[:] Rprime_noglint
cdef float[:] Tmol
cdef float[:] wav
cdef WaterModel w
^
------------------------------------------------------------
polymer/polymer_main.pyx:49:9: 'WaterModel' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
# 3) calculate rho_w_mod_cov from the Jacobian matrix of the model
# (eq 55 - 58 of E3UB)
# rho_w_mod_cov = d_rw_x . f.cov . d_rw_x'
# [NbxNb] [NbxNp] [NpxNp] [NpxNb]
dot(d_rw_x_cov, d_rw_x, self.f.cov, 0)
^
------------------------------------------------------------
polymer/polymer_main.pyx:647:20: 'dot' is not a constant, variable or function identifier
Error compiling Cython file:
------------------------------------------------------------
...
# 3) calculate rho_w_mod_cov from the Jacobian matrix of the model
# (eq 55 - 58 of E3UB)
# rho_w_mod_cov = d_rw_x . f.cov . d_rw_x'
# [NbxNb] [NbxNp] [NpxNp] [NpxNb]
dot(d_rw_x_cov, d_rw_x, self.f.cov, 0)
dot(rho_w_mod_cov, d_rw_x_cov, d_rw_x, 1)
^
------------------------------------------------------------
polymer/polymer_main.pyx:648:20: 'dot' is not a constant, variable or function identifier
Traceback (most recent call last):
File "setup.py", line 34, in <module>
ext_modules=cythonize(
File "/home/hypso/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/home/hypso/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: polymer/polymer_main.pyx
make: *** [makefile:9: main] Error 1
Error while Installing Latest Polymer Version beta2
-
- Posts: 6
- Joined: Wed Mar 02, 2022 1:03 pm
- company / institution: University of Bergen
- Location: Bergen
Re: Error while Installing Latest Polymer Version beta2
Hi Vishnu and François,
I hope its ok if I add my problem here. I'm also having issues updating Polymer (had the same issues with 4.16 and am now having them with 4.17 beta2).
Everything up to 'make' works fine, then I get the error copied below. I'm on Windows10 using WSL. Looks like a similar issue as you are experiencing with Cython. I tried replacing print A.interp() with print(A.interp()) and then I get the same error as you, Vishnu (polymer/polymer_main.pyx:648:20: 'dot' is not a constant, variable or function identifier). Please let me know if you've found a solution for this? Thank you!
(polymer) etess@iftc3yr2j3:/mnt/c/Users/ete085/AtmCorr/polymer-v4.17beta2/polymer-v4.17beta2$ make
python setup.py build_ext --inplace
Compiling polymer/clut.pyx because it changed.
Compiling polymer/neldermead.pyx because it changed.
Compiling polymer/polymer_main.pyx because it changed.
Compiling polymer/water.pyx because it changed.
[1/4] Cythonizing polymer/clut.pyx
/home/etess/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /mnt/c/Users/ete085/AtmCorr/polymer-v4.17beta2/polymer-v4.17beta2/polymer/clut.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
cdef CLUT A = CLUT(np.array([[1, 2, 3], [4, 5, 6]]), axes=[[1, 2], [10, 11, 12]])
assert A.lookup(0, 1.5) == 0
assert A.lookup(1, 11.5) == 0
print A.interp()
^
------------------------------------------------------------
polymer/clut.pyx:293:10: Syntax error in simple statement list
Traceback (most recent call last):
File "setup.py", line 34, in <module>
ext_modules=cythonize(
File "/home/etess/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/home/etess/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: polymer/clut.pyx
make: *** [makefile:9: main] Error 1
I hope its ok if I add my problem here. I'm also having issues updating Polymer (had the same issues with 4.16 and am now having them with 4.17 beta2).
Everything up to 'make' works fine, then I get the error copied below. I'm on Windows10 using WSL. Looks like a similar issue as you are experiencing with Cython. I tried replacing print A.interp() with print(A.interp()) and then I get the same error as you, Vishnu (polymer/polymer_main.pyx:648:20: 'dot' is not a constant, variable or function identifier). Please let me know if you've found a solution for this? Thank you!
(polymer) etess@iftc3yr2j3:/mnt/c/Users/ete085/AtmCorr/polymer-v4.17beta2/polymer-v4.17beta2$ make
python setup.py build_ext --inplace
Compiling polymer/clut.pyx because it changed.
Compiling polymer/neldermead.pyx because it changed.
Compiling polymer/polymer_main.pyx because it changed.
Compiling polymer/water.pyx because it changed.
[1/4] Cythonizing polymer/clut.pyx
/home/etess/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /mnt/c/Users/ete085/AtmCorr/polymer-v4.17beta2/polymer-v4.17beta2/polymer/clut.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
cdef CLUT A = CLUT(np.array([[1, 2, 3], [4, 5, 6]]), axes=[[1, 2], [10, 11, 12]])
assert A.lookup(0, 1.5) == 0
assert A.lookup(1, 11.5) == 0
print A.interp()
^
------------------------------------------------------------
polymer/clut.pyx:293:10: Syntax error in simple statement list
Traceback (most recent call last):
File "setup.py", line 34, in <module>
ext_modules=cythonize(
File "/home/etess/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/home/etess/anaconda3/envs/polymer/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: polymer/clut.pyx
make: *** [makefile:9: main] Error 1
-
- Posts: 13
- Joined: Fri Jul 12, 2019 1:22 am
- company / institution: University of Victoria
- Location: Victoria
Re: Error while Installing Latest Polymer Version beta2
Hi,
I am installing Polymer on Linux system, but the issue seems the same. To solve this Cython compilation issue, please use the latest Polymer version on the Github.
Best, Vishnu
I am installing Polymer on Linux system, but the issue seems the same. To solve this Cython compilation issue, please use the latest Polymer version on the Github.
Best, Vishnu