pip 3.5 vs python 3.4, what the heck?

Adam Funk a24061 at ducksburg.com
Mon Dec 14 15:56:58 UTC 2015


I'm interested in using NLTK with Python 3 on an Ubuntu 15.10 system.
So I did `sudo pip3 install -U nltk`, which seemed to work, then I
remembered to `sudo chmod -R /usr/local/lib/python*` (because I've had
permissions obstacles to pip installations previously).  Then:

$ python3
Python 3.4.3+ (default, Oct 14 2015, 16:03:50) 
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'nltk'

It turns out pip3 installed the nltk package in
'/usr/local/lib/python3.5/' instead of '.../python3.4/'.  A bit more
poking around turns up a '/usr/bin/python3.5' command, so:

$ python3.5
Python 3.5.0+ (default, Oct 11 2015, 09:05:38) 
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
>>> nltk.corpus.brown.words()[:5]
['The', 'Fulton', 'County', 'Grand', 'Jury']

So, why the heck is Ubuntu setting the default versions of pip3 to 3.5
& python3 to 3.4 in the same distribution?  Will it do any harm if I
change the '/usr/bin/python3' symlink to point to 'python3.5' instead
of 'python3.4'?

Oh, and what are the identical files with 'm' at the end of the names
for?





More information about the ubuntu-users mailing list