xpra icon
Bug tracker and wiki

Opened 6 months ago

Closed 8 weeks ago

#2224 closed defect (fixed)

win32 python3 vs python2 install mixup

Reported by: totaamwin32 Owned by: Antoine Martin
Priority: major Milestone: 3.0
Component: packaging Version: 2.4.x
Keywords: Cc:

Description

Ended up with a broken installation.

C:\Program Files\Xpra>xpra_cmd
Traceback (most recent call last):
  File "C:/msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/initscripts/__st
artup__.py", line 7, in <module>
    import os
  File "C:/msys64/mingw64/lib/python2.7/os.py", line 400, in <module>
    import UserDict
  File "C:/msys64/mingw64/lib/python2.7/UserDict.py", line 116, in <module>
    import _abcoll
  File "C:/msys64/mingw64/lib/python2.7/_abcoll.py", line 11, in <module>
    from abc import ABCMeta, abstractmethod
  File "C:\Program Files\Xpra/lib/abc.py", line 147
    print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file)
                                                      ^
SyntaxError: invalid syntax

C:\Program Files\Xpra>

That abc.py is the one from python3, not python2!
But when we run the installer, we're supposed to remove the existing version before installing so this should not be possible.

Reminds me of #2126.

Change History (3)

comment:1 Changed 6 months ago by stdedos

Replying to totaamwin32:

Hopefully this didn't cause #2224.

I remember @antoine saying that py2 vs py3 is deliberately not handled, so that shouldn't be a problem. However, it should be easy to verify:

  • Cleanup installation
  • Install version a
  • Open some xpra command
  • Install version b

in-between step 2 and 4, xpra uninstaller should prompt you to close xpra. If that doesn't work, try the same just before going to the step that will auto-call the uninstaller.

I haven't tried that exact scenario, but, I do remember uninstaller popping up whenever I upgrade/downgrade

comment:2 Changed 8 weeks ago by Antoine Martin

Status: newassigned

Looks like a job for DelTree

comment:3 Changed 8 weeks ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

We can't actually delete the whole tree because we can't be sure where it was / is installed, so r23326 just deletes the python object files to prevent this version clash.
This should be enough, and it should be safe to do.

Note: See TracTickets for help on using tickets.