aiida-common-workflows
aiida-common-workflows copied to clipboard
Unable to install with Python 3.10 due to pymatgen
trying to install with Python 3.10 gives:
pymatgen/optimization/neighbors.c: In function ‘__Pyx_TraceSetupAndCall’:
pymatgen/optimization/neighbors.c:26523:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
26523 | tstate->use_tracing = 0;
| ^~~~~~~~~~~
| tracing
pymatgen/optimization/neighbors.c:26531:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
26531 | tstate->use_tracing = (tstate->c_profilefunc ||
| ^~~~~~~~~~~
| tracing
pymatgen/optimization/neighbors.c:26536:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
26536 | return tstate->use_tracing && retval;
| ^~~~~~~~~~~
| tracing
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pymatgen
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Quick googling shows that Python 3.10 has a change triggering that. Due to the block for newer versions of pymatgen installation is broken with Python 3.10.
I had mentioned this to them early this year https://github.com/materialsproject/pymatgen/issues/2332 They closed it but I never checked if they actually fixed it. They may have done in a new release that you are not getting due to an upper bound
Fixed in #327