Opened 2 years ago

Closed 2 years ago

#29627 closed defect (fixed)

"sage -python", "sage -pip", etc.: Do not fall back to system Python

Reported by: mkoeppe Owned by:
Priority: critical Milestone: sage-9.1
Component: build Keywords:
Cc: jhpalmieri, dimpase, vbraun Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 248c13b (Commits, GitHub, GitLab) Commit: 248c13b542b12521bd91d6648bd6220fb7593a26
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

(from #29626)

With a fresh tarball, sage --pip install PKG doesn't do what I want: since I'm using the system Python, it installs the package in the system location, not in SAGE_ROOT/local/..

(It gives an error for a bootstrapped, unconfigured tree, but calls system python in a configured tree.)

In this ticket, we change all of sage -pip, sage -python, sage -python3 etc. to give an error if Sage's Python has not been built yet (or the venv over the system python3 set up).

Change History (7)

comment:1 Changed 2 years ago by mkoeppe

sage -pip just calls sage-python -m pip.

In fact, sage -python should probably exit with an error if the venv (or Sage's python) has not been created yet.

comment:2 Changed 2 years ago by mkoeppe

  • Description modified (diff)

comment:3 Changed 2 years ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Cc dimpase vbraun added
  • Description modified (diff)
  • Status changed from new to needs_review
  • Summary changed from "sage -pip" should never install into the system Python's site-packages to "sage -python", "sage -pip", etc.: Do not fall back to system Python

comment:4 Changed 2 years ago by mkoeppe

  • Branch set to u/mkoeppe/_sage__pip__should_never_install_into_the_system_python_s_site_packages

comment:5 Changed 2 years ago by dimpase

  • Commit set to 248c13b542b12521bd91d6648bd6220fb7593a26
  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

ok, this makes sense.

New commits:

248c13b"sage -python", "sage -pip", etc.: Do not fall back to system Python

comment:6 Changed 2 years ago by mkoeppe


comment:7 Changed 2 years ago by vbraun

  • Branch changed from u/mkoeppe/_sage__pip__should_never_install_into_the_system_python_s_site_packages to 248c13b542b12521bd91d6648bd6220fb7593a26
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.