0

I just installed Python 3.5 (and its 2908 library files) using synaptic on top of my existing functional Python 3.4 install in Ubuntu 14.04. Looking at the result, after install:

$ cd /usr/bin
$ ls -lsAFi python*
393463 0 lrwxrwxrwx 1 root root 18 Jul 2 2014 python -> /usr/bin/python2.7*
394201 0 lrwxrwxrwx 1 root root 9 May 9 2014 python2 -> python2.7*
393228 3272 -rwxr-xr-x 1 root root 3345416 Jun 22 20:51 python2.7*
394075 0 lrwxrwxrwx 1 root root 33 Jun 22 20:51 python2.7-config -> x86_64-linux-gnu-python2.7-config*
398355 0 lrwxrwxrwx 1 root root 16 Dec 21 2013 python2-config -> python2.7-config*
394203 0 lrwxrwxrwx 1 root root 9 Nov 27 11:04 python3 -> python3.5*
394046 3628 -rwxr-xr-x 2 root root 3709944 Oct 14 23:42 python3.4*
394046 3628 -rwxr-xr-x 2 root root 3709944 Oct 14 23:42 python3.4m*
395645 3672 -rwxr-xr-x 2 root root 3754696 Sep 17 19:03 python3.5*
396673 0 lrwxrwxrwx 1 root root 33 Sep 17 19:03 python3.5-config -> x86_64-linux-gnu-python3.5-config*
396677 0 lrwxrwxrwx 1 root root 11 Sep 17 19:03 python3.5-dbg -> python3.5dm*
396678 0 lrwxrwxrwx 1 root root 37 Sep 17 19:03 python3.5-dbg-config -> x86_64-linux-gnu-python3.5-dbg-config*
396676 13164 -rwxr-xr-x 1 root root 13455475 Sep 17 18:58 python3.5dm*
396679 0 lrwxrwxrwx 1 root root 35 Sep 17 19:03 python3.5dm-config -> x86_64-linux-gnu-python3.5dm-config*
395645 3672 -rwxr-xr-x 2 root root 3754696 Sep 17 19:03 python3.5m*
396674 0 lrwxrwxrwx 1 root root 34 Sep 17 19:03 python3.5m-config -> x86_64-linux-gnu-python3.5m-config*
394206 0 lrwxrwxrwx 1 root root 10 Nov 27 11:12 python3m -> python3.5m*
398354 0 lrwxrwxrwx 1 root root 16 Dec 21 2013 python-config -> python2.7-config*

--> ... a few symlinks + 2 hard links (inodes:394046 and 395645).

My questions:

  • what is the reason for files pythonX.Y and pythonX.Ym co-existing? python3.4 and python3.4m point to the same stored content with two names (hard link). Same for python3.5 and python3.5m. So what's the use of both python3.4m and python3.5m?

  • can I get rid of Python 3.4 and its libraries without messing things up and how ? (For instance if I use synaptic, marking Python 3.4 for "removal" will automatically remove a lot of reverse dependencies, i.e. package I need. So that a no-go.)

EDIT:
To help answer the question as to where I got Python 3.5, a package normally unavailable to Ubuntu users, I list package sources, from /etc/apt/sources.list. I do not list ppa in /etc/apt/sources.list.d as they are dedicated to one package only, different from Python 3.5:

From Canonical at http://ubuntu.cica.es/ubuntu/, unless otherwise indicated: (deb and deb-src)
- trusty main restricted
- trusty-updates main restricted
- trusty universe
- trusty-updates universe
- trusty multiverse
- trusty-updates multiverse
- trusty-security main restricted
- trusty-security universe
- trusty-security multiverse
- http://archive.canonical.com/ubuntu trusty partner
Software from third-party: (deb and deb-src)
- http://extras.ubuntu.com/ubuntu trusty main
Software from third-party: (deb only)
- http://archive.getdeb.net/ubuntu trusty-getdeb apps
- http://ubuntu.cica.es/ubuntu/ trusty-backports main universe multiverse restricted

Cbhihe
  • 2,701
  • How exactly you installed python 3.5? – Braiam Nov 27 '15 at 15:49
  • Hi @Braiam, I installed it with Synaptics. I then discovered that changing symbolic links python3m -> python3.4m to + python3m -> python3.5m and python3 -> python3.4 to python3 -> python3.5 broke at least two things: indicator-stickynotes (disappeared from the indicator bar in Unity) and Ubuntu Soft Center, which can still launch but with limited capability: for instance I cannot have access to the menu Edit> Software Sources.... – Cbhihe Nov 27 '15 at 20:35
  • From where you got the packages? IMO, Ubuntu shouldn't have 3.5 packages. – Braiam Nov 30 '15 at 19:04
  • 1
    You don't understand. None of the stable versions of Ubuntu has python 3.5 on the repositories, so from somewhere not supported you got the packages, and having your system broken isn't actually that surprising. I ask again: From where you got the python 3.5 packages? – Braiam Dec 01 '15 at 12:16
  • @Braiam, I hadn't understood you. Thomas Dickey asks same question below. See EDIT section in my original question. Universe, Multiverse, Extras, Backports ? – Cbhihe Dec 21 '15 at 16:23
  • Instead of that, add apt-cache policy python3. – Braiam Dec 21 '15 at 16:37

1 Answers1

2

The reason for pairs like this:

394046 3628 -rwxr-xr-x 2 root root 3709944 Oct 14 23:42 python3.4*
394046 3628 -rwxr-xr-x 2 root root 3709944 Oct 14 23:42 python3.4m*

is this: "3.4m" happens to be "3.4", linked with Pymalloc as noted in Mailing List Archive: Re: l = range(int(1E9)). That automatically adds the "m" suffix (see comment devel/boost-python with python 3.4, and pymalloc).

The same question for instance was asked in python3.4 vs python3.4m #32402 (Homebrew), and someone pointed to a more detailed answer here: PEP 3149 -- ABI version tagged .so files . In that PEP page, the rationale describes this use of links as background for a different proposed change affecting the names used for shared libraries.

As for removing a package: it depends.

  • Ubuntu 14.04 (as noted in comments) does not provide python3.5 (it provides python3.4).
  • If you simply remove python3.4 from a plain Ubuntu 14.04, synaptic would (prompting first) remove about a hundred packages—including Firefox.
  • Actually, I use apt-get first, then tweak with aptitude, but read that synaptic behaves close enough to aptitude—and a quick check shows that it does, although a few orders of magnitude slower.
  • So: if you installed python3.5 using syntaptic, that was done by adding repositories (not mentioned in the question), and the success of synaptic in discarding the python3.4 would depend on what other packages those additional repositories provide, and whether it recognizes those as either compatible or a valid upgrade.
Thomas Dickey
  • 76,765
  • Tx and +1 @ThomasDickey for pointing me to those links and for explaining. Apparently I should have gone deeper in my Startpage search answers to find them. The question is now how to do a clean upgrade from 3.4.3 to 3.5 so that all remnants of 3.4.3 are cleaned out.... I'd be glad to mark yr answer as good if you could expand somewhat on that. Cheers. – Cbhihe Nov 30 '15 at 16:08
  • Thanks Thomas. See my *Edit* in my original post. The answer as to how I got Python 3.5 to show in Synaptics probably lies in the repos I enabled. I have not uninstalled Python 3.4.3 but instead got rid of Python 3.5. It's been a learning experience. – Cbhihe Dec 01 '15 at 15:54