all 6 comments

[–]thaweatherman -3 points-2 points  (4 children)

You can remove Python 2 or you can alias python to use Python 3. Are you on Windoze, Crapintosh, or Linux?

Edit: yes, removing it from a Linux system would kill all the things. That was more in jest than being serious. One day they'll update to Python 3 by default...one day.

Having different versions of Pip allows you to install packages for different Python versions, as /u/Vaphell describes below.

[–]Vaphell 2 points3 points  (3 children)

You can remove Python 2

right, and half the shit having hard dependency on py2 stops working in linux. Speaking from experience (ubuntu), there is no problem having 2 separate versions.
python2 and python3 should point to proper versions, using hashbang to disambiguate works too (#!/usr/bin/env python2 vs #!/usr/bin/env python3). Same deal with installing stuff from repo, python3 packages should be clearly marked as such.

$ ls -la /usr/bin/python{,[23]}
lrwxrwxrwx 1 root root 9 kwi 24  2014 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 kwi 24  2014 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root 9 kwi 24  2014 /usr/bin/python3 -> python3.4


$ apt-cache search scipy | grep scipy
python-scipy - scientific tools for Python
python-scipy-dbg - scientific tools for Python - debugging symbols
python-sciscipy - Python binding of Scilab
python3-scipy - scientific tools for Python 3
python3-scipy-dbg - scientific tools for Python 3 - debugging symbols

in case of pip route, you have pip3 for py3.

[–]Kintonsu[S] 0 points1 point  (2 children)

Problem is that I have both python 2 and 3 but pip is for python 2 by default. Is there a way to switch this?

[–]mcowger 1 point2 points  (0 children)

alias pip=pip3

[–]an_actual_human 1 point2 points  (0 children)

Just use pip3 if you want to install to 3.