You are not logged in.
Pages: 1
Hi.
I have these files and folders in /usr/bin:
python, python2, python2.7, python2.7-config, python2-config, python3, python3.6, python3.6-config, python3.6m, python3.6m-conig, python-config.
I wanna use just the newest version of Python.
Can I remove older versions of Python, I think python2, python2.7 and python3.
And which version is just python?
Offline
Not of the files you listed should be binaries. Most should be symlinks to the latest version.
Offline
$
$ ls -l $(which python)
lrwxrwxrwx 1 root root 7 Jan 4 2018 /usr/bin/python -> python3
$ ls -l $(which python3)
lrwxrwxrwx 1 root root 9 Jan 4 2018 /usr/bin/python3 -> python3.6
$ ls -l $(which python3.6)
-rwxr-xr-x 2 root root 10024 Jan 4 2018 /usr/bin/python3.6
$ On this, needs to updated system, python points at python3. python3 points at the executable python3.6
Determine of the other interpreters are required for anything you are using using pacman -Qi
$ pacman -Qi python2
Name : python2
Version : 2.7.14-2
Description : A high-level scripting language
Architecture : x86_64
URL : http://www.python.org/
Licenses : PSF
Groups : None
Provides : None
Depends On : bzip2 gdbm openssl zlib expat sqlite libffi
Optional Deps : tk: for IDLE
python2-setuptools [installed]
python2-pip
Required By : asciidoc libkate mercurial python2-appdirs python2-cairo python2-gobject2 python2-pyparsing
python2-six smbclient volume_key
Optional For : alsa-lib boost clang git ldb libevent libglade libproxy talloc tdb tevent texlive-core
texlive-music usbutils vim
Conflicts With : python<3
Replaces : None
Installed Size : 72.44 MiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Thu 04 Jan 2018 06:42:53 PM PST
Install Date : Tue 27 Mar 2018 07:16:01 AM PDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
$ Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Thanks.
So packages in Required By needs python2 and packages in Optional For should they have it, but not necessarily?
And why so many links (python to python3 and python3 to python3.6)?
Why is there not only a python or python3.6?
Last edited by 123John321 (2018-07-23 19:13:59)
Offline
The link from python to python3 is provided by the arch package (from when arch transitioned from python2 to python3 providing python)
The python3 to python 3.6 link and python3.6m being hardlinked python3.6 is from the upstream Makefile I believe.
Edit:
clarify python3.6m to python3.6 is a hardlink.
Last edited by loqs (2018-07-23 19:41:15)
Offline
Sorry, but I do not understand.
When python3.6m is the identical binary to python3.6, can I delete it?
Offline
It is a hardlink so takes no practical space and is provided by the package as arch follows upstream's wishes so I would strongly suggest leaving it alone.
Offline
Scripts may ask for python, python2, python3, etc... If a script wants python, the chain of links eventually gets you to python3.6. Same if a script asks for python3. If 3.6 changes to 3.7 in the future, scripts asking for python 3 will still work.
Also, if a script asks for python2 (knowing it won't work with 3), then the python2 will lead to the installed version of 2; whether it is 2.6. 2.7, etc...
If a script asks for a specific version , such as 3.6, it will stop working if the installed version changes to 3.7. (Actually, it would probably block the upgrade)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Pages: 1