Opened 4 years ago

Closed 2 years ago

#20215 closed defect (wontfix)

Cannot install both python2 and python3

Reported by: dkrenn Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: optional Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

sage -i python3
sage -sh
python3

fails with

Fatal Python error: Py_Initialize: Unable to get the locale encoding
  File "/.../sage/7.1.rc0/local/lib/python/encodings/__init__.py", line 123
    raise CodecRegistryError,\
                            ^
SyntaxError: invalid syntax

It seems the wrong path is used: the symlink local/lib/python instead of local/lib/python3. Changing this symlink to local/lib/python3 makes python3 work, but prevents python2 from working.

Change History (9)

comment:1 Changed 4 years ago by jdemeyer

  • Summary changed from cannot run python3 in sage-shell to Cannot install both python2 and python3

comment:2 Changed 3 years ago by chapoton

see also #18521

comment:3 Changed 3 years ago by jdemeyer

I don't think this is a bug: either choose Python 2 or Python 3. Supporting both at the same time would be a lot of unnecessary trouble. We don't support concurrent installations of GMP and MPIR either.

comment:4 Changed 3 years ago by chapoton

see also #21199

comment:5 Changed 2 years ago by chapoton

is this fixed now, or not yet ? it should be, because py3 is standard..

Last edited 2 years ago by chapoton (previous) (diff)

comment:6 Changed 2 years ago by jhpalmieri

Also local/lib/python should no longer exist, because of #22764: there should just be local/lib/python2.7 and local/lib/python3.5.

comment:7 Changed 2 years ago by chapoton

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

fixed now, let us close that

comment:8 Changed 2 years ago by chapoton

  • Status changed from needs_review to positive_review

comment:9 Changed 2 years ago by embray

  • Resolution set to wontfix
  • Status changed from positive_review to closed

Closing tickets in the sage-duplicate/invalid/wontfix module with positive_review (i.e. someone has confirmed they should be closed).

Note: See TracTickets for help on using tickets.