Opened 17 months ago

Closed 7 months ago

#28738 closed defect (duplicate)

Docker SageMath install fails

Reported by: saraedum Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: docker Keywords: docker, ci
Cc: embray, slelievre Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/saraedum/docker-runtime-sage (Commits, GitHub, GitLab) Commit: 93152407ae99d9bcaa2c88218aa3397098fd0ffb
Dependencies: #29090 Stopgaps:

Status badges

Description

See https://gitlab.com/sagemath/sage/-/jobs/346689490#L2328

2328 Step 61/66 : RUN sudo $SAGE_ROOT/sage --nodotsage -c "install_scripts('/usr/bin')"
2329  ---> Running in 1751eed7188f
2330 /home/sage/sage/build/bin/sage-system-python: line 24: exec: : not found

Change History (16)

comment:1 Changed 17 months ago by saraedum

I have not checked what's causing this but Python 2 builds fail with this error.

comment:2 Changed 17 months ago by embray

It would appear that sage-system-python is, well, not finding the system python. Far less clear is why that command would seem to be invoking sage-system-python in the first place...

comment:3 Changed 17 months ago by embray

FWIW I was able to reproduce the problem locally, no problem. But I haven't looked into what's causing it yet.

comment:4 follow-up: Changed 17 months ago by embray

I see now. Just recently (which is why I didn't see this at first; I hadn't pulled this update locally) in #28657 the sage-location script was changed to use sage-system-python, and sage-location is called by the main sage script.

I'm not sure yet exactly why this change was made but it should be perfectly possible to work around.

comment:5 Changed 17 months ago by saraedum

  • Keywords docker ci added

comment:6 Changed 17 months ago by saraedum

  • Branch set to u/saraedum/docker-runtime-sage

comment:7 Changed 17 months ago by saraedum

  • Commit set to 93152407ae99d9bcaa2c88218aa3397098fd0ffb

I'm now installing Python as a runtime dependency. Not sure that's the best way to fix this; I asked on #28657.


New commits:

9315240SageMath now requires system Python to be available at runtime

comment:8 in reply to: ↑ 4 Changed 17 months ago by jhpalmieri

Replying to embray:

I see now. Just recently (which is why I didn't see this at first; I hadn't pulled this update locally) in #28657 the sage-location script was changed to use sage-system-python, and sage-location is called by the main sage script.

I'm not sure yet exactly why this change was made but it should be perfectly possible to work around.

The change is explained in #28657: on some systems, for example the latest releases of Ubuntu, there is no python executable, just python3. On top of that, in a Python 3 build of Sage, we don't create a python executable. So we shouldn't expect #!/usr/bin/env python to work.

It sounds like sage-system-python is not robust enough, if it's not handling this situation.

comment:9 follow-up: Changed 17 months ago by jhpalmieri

Or sage-location should be able to use Sage's Python, if that's the only one available. Are there really systems with neither python nor python3 on which Sage is expected to run?

comment:10 in reply to: ↑ 9 Changed 17 months ago by saraedum

Replying to jhpalmieri:

Or sage-location should be able to use Sage's Python, if that's the only one available. Are there really systems with neither python nor python3 on which Sage is expected to run?

The SageMath download page at least does not say that you need Python.

Is Python pre-installed on Windows these days?

It comes pre-installed on macOS, but that's bound to change I think:

Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. In future versions of macOS, scripting language runtimes won’t be available by default, and may require you to install an additional package. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)

comment:11 Changed 15 months ago by embray

  • Milestone changed from sage-9.0 to sage-9.1

Ticket retargeted after milestone closed

comment:12 Changed 13 months ago by mkoeppe

See also #29090 - "configure forgets to check whether ANY Python is available on the system"

comment:13 Changed 13 months ago by mkoeppe

Fixed by #29090.

comment:14 Changed 13 months ago by mkoeppe

  • Dependencies set to #29090

comment:15 Changed 11 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

comment:16 Changed 7 months ago by chapoton

  • Resolution set to duplicate
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.