nest / nest-docker

Build scripts for the docker container with NEST simulator and services
https://nest-simulator.org/
GNU General Public License v2.0
3 stars 7 forks source link

NESTML dev version installation error #116

Closed steffengraber closed 2 years ago

steffengraber commented 2 years ago

In the CI of the development Docker image, an error occurs during the installation of NESTML. The development version of NESTML is installed with:

RUN python3 -m pip install https://github.com/nest/nestml/archive/refs/heads/master.zip --upgrade

This leads to the error:

AssertionError: Python 3.9 or higher is required to run NESTML

Full error message:

=> ERROR [stage-1 4/6] RUN python3 -m pip install https://github.com/nest/nestml/archive/refs/heads/master.zip --upgrade 6.5s


[stage-1 4/6] RUN python3 -m pip install https://github.com/nest/nestml/archive/refs/heads/master.zip --upgrade:

11 1.095 Collecting https://github.com/nest/nestml/archive/refs/heads/master.zip

11 1.735 Downloading https://github.com/nest/nestml/archive/refs/heads/master.zip

11 6.354 ERROR: Command errored out with exit status 1:

11 6.354 command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-qv50vk09/setup.py'"'"'; file='"'"'/tmp/pip-req-build-qv50vk09/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-qv50vk09/pip-egg-info

11 6.354 cwd: /tmp/pip-req-build-qv50vk09/

11 6.354 Complete output (5 lines):

11 6.354 Traceback (most recent call last):

11 6.354 File "", line 1, in

11 6.354 File "/tmp/pip-req-build-qv50vk09/setup.py", line 26, in

11 6.354 assert sys.version_info.major >= 3 and sys.version_info.minor >= 9, "Python 3.9 or higher is required to run NESTML"

11 6.354 AssertionError: Python 3.9 or higher is required to run NESTML

11 6.354 ----------------------------------------

11 6.378 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


executor failed running [/bin/sh -c python3 -m pip install https://github.com/nest/nestml/archive/refs/heads/master.zip --upgrade]: exit code: 1

steffengraber commented 2 years ago

@clinssen @pnbabu What reason is there for NESTML to rely on python v3.9 as the minimum version rather than v3.8? Is there perhaps also something for NEST to keep in mind? (@terhorstd )

pnbabu commented 2 years ago

@steffengraber We updated the python version in NESTML after checking that the NEST CI also uses Python 3.9: https://github.com/nest/nest-simulator/blob/master/.github/workflows/nestbuildmatrix.yml#L27

steffengraber commented 2 years ago

In the environment.yml is minimum of python v3.8: https://github.com/nest/nest-simulator/blob/7086c3cabb8923efd2ca783da02e8253ecfde865/environment.yml#L35

In cmake: https://github.com/nest/nest-simulator/blob/7086c3cabb8923efd2ca783da02e8253ecfde865/cmake/ProcessOptions.cmake#L358

And the documentation points to the environment.yml: https://nest-simulator.readthedocs.io/en/latest/installation/developer.html#dev-install

steffengraber commented 2 years ago

But there are other problems with python v3.8 (#117) - I think I will switch to ubuntu jammy and python v3.10.

pnbabu commented 2 years ago

@steffengraber Thanks for sharing these. We updated the NESTML python version to support some latest python APIs we use that are present in 3.9. So we checked the NEST CI before updating it in NESTML. @terhorstd is there any reason for having Python 3.9 in NEST CI?

steffengraber commented 2 years ago

Fixed docker images (#118). But maybe something to discuss in the NEST context.