How to update Python?

后端 未结 4 1543
名媛妹妹
名媛妹妹 2020-12-02 04:31

I have version 2.7 installed from early 2012. I can\'t find any consensus on whether I should completely uninstall and wipe this version before putting on the latest version

4条回答
  •  囚心锁ツ
    2020-12-02 05:22

    • Official Python .msi installers are designed to replace:

      • any previous micro release (in x.y.z, z is "micro") because they are guaranteed to be backward-compatible and binary-compatible
      • a "snapshot" (built from source) installation with any micro version
    • A snapshot installer is designed to replace any snapshot with a lower micro version.

    (See responsible code for 2.x, for 3.x)

    Any other versions are not necessarily compatible and are thus installed alongside the existing one. If you wish to uninstall the old version, you'll need to do that manually. And also uninstall any 3rd-party modules you had for it:

    • If you installed any modules from bdist_wininst packages (Windows .exes), uninstall them before uninstalling the version, or the uninstaller might not work correctly if it has custom logic
    • modules installed with setuptools/pip that reside in Lib\site-packages can just be deleted afterwards
    • packages that you installed per-user, if any, reside in %APPDATA%/Python/PythonXY/site-packages and can likewise be deleted

提交回复
热议问题