How do I install a different Python version using apt-get?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
103
down vote

favorite
32












How can I install a different version of Python using apt-get?



Obviously I realise I can install using the source tar ball, however I would prefer not to install from source and instead use the package manager, as that's what it's there for. Surely somewhere reputable builds .deb files for the latest Python releases (why python.org don't is beyond me) that I can reference.



What do I need to do to reference them and what issues might it create when upgrading to the next version?



If there is no way except for building from source, is there a (pseudo) package that I can can install that will provide all of the dependencies needed without having to find and install each individually? So that I don't get:



The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib






share|improve this question


















  • 4




    askubuntu.com/questions/674586/…
    – h0ch5tr4355
    Oct 8 '15 at 6:12










  • did you ever get E: Couldn't find any package by regex 'python3.5' and thus failed to install via apt-get install python3.5?
    – Charlie Parker
    Dec 16 '16 at 7:06










  • similar question: askubuntu.com/questions/310441/…
    – Charlie Parker
    Jan 16 '17 at 22:22










  • some good suggestions here: quora.com/…
    – Charlie Parker
    Jan 18 '17 at 0:19






  • 1




    @CharlieParker Did you try installing Anaconda ?
    – M. Becerra
    Feb 8 '17 at 18:44














up vote
103
down vote

favorite
32












How can I install a different version of Python using apt-get?



Obviously I realise I can install using the source tar ball, however I would prefer not to install from source and instead use the package manager, as that's what it's there for. Surely somewhere reputable builds .deb files for the latest Python releases (why python.org don't is beyond me) that I can reference.



What do I need to do to reference them and what issues might it create when upgrading to the next version?



If there is no way except for building from source, is there a (pseudo) package that I can can install that will provide all of the dependencies needed without having to find and install each individually? So that I don't get:



The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib






share|improve this question


















  • 4




    askubuntu.com/questions/674586/…
    – h0ch5tr4355
    Oct 8 '15 at 6:12










  • did you ever get E: Couldn't find any package by regex 'python3.5' and thus failed to install via apt-get install python3.5?
    – Charlie Parker
    Dec 16 '16 at 7:06










  • similar question: askubuntu.com/questions/310441/…
    – Charlie Parker
    Jan 16 '17 at 22:22










  • some good suggestions here: quora.com/…
    – Charlie Parker
    Jan 18 '17 at 0:19






  • 1




    @CharlieParker Did you try installing Anaconda ?
    – M. Becerra
    Feb 8 '17 at 18:44












up vote
103
down vote

favorite
32









up vote
103
down vote

favorite
32






32





How can I install a different version of Python using apt-get?



Obviously I realise I can install using the source tar ball, however I would prefer not to install from source and instead use the package manager, as that's what it's there for. Surely somewhere reputable builds .deb files for the latest Python releases (why python.org don't is beyond me) that I can reference.



What do I need to do to reference them and what issues might it create when upgrading to the next version?



If there is no way except for building from source, is there a (pseudo) package that I can can install that will provide all of the dependencies needed without having to find and install each individually? So that I don't get:



The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib






share|improve this question














How can I install a different version of Python using apt-get?



Obviously I realise I can install using the source tar ball, however I would prefer not to install from source and instead use the package manager, as that's what it's there for. Surely somewhere reputable builds .deb files for the latest Python releases (why python.org don't is beyond me) that I can reference.



What do I need to do to reference them and what issues might it create when upgrading to the next version?



If there is no way except for building from source, is there a (pseudo) package that I can can install that will provide all of the dependencies needed without having to find and install each individually? So that I don't get:



The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _ssl _tkinter
readline zlib








share|improve this question













share|improve this question




share|improve this question








edited Oct 11 '17 at 10:48









muru

1




1










asked Oct 8 '15 at 6:06









harry

617255




617255







  • 4




    askubuntu.com/questions/674586/…
    – h0ch5tr4355
    Oct 8 '15 at 6:12










  • did you ever get E: Couldn't find any package by regex 'python3.5' and thus failed to install via apt-get install python3.5?
    – Charlie Parker
    Dec 16 '16 at 7:06










  • similar question: askubuntu.com/questions/310441/…
    – Charlie Parker
    Jan 16 '17 at 22:22










  • some good suggestions here: quora.com/…
    – Charlie Parker
    Jan 18 '17 at 0:19






  • 1




    @CharlieParker Did you try installing Anaconda ?
    – M. Becerra
    Feb 8 '17 at 18:44












  • 4




    askubuntu.com/questions/674586/…
    – h0ch5tr4355
    Oct 8 '15 at 6:12










  • did you ever get E: Couldn't find any package by regex 'python3.5' and thus failed to install via apt-get install python3.5?
    – Charlie Parker
    Dec 16 '16 at 7:06










  • similar question: askubuntu.com/questions/310441/…
    – Charlie Parker
    Jan 16 '17 at 22:22










  • some good suggestions here: quora.com/…
    – Charlie Parker
    Jan 18 '17 at 0:19






  • 1




    @CharlieParker Did you try installing Anaconda ?
    – M. Becerra
    Feb 8 '17 at 18:44







4




4




askubuntu.com/questions/674586/…
– h0ch5tr4355
Oct 8 '15 at 6:12




askubuntu.com/questions/674586/…
– h0ch5tr4355
Oct 8 '15 at 6:12












did you ever get E: Couldn't find any package by regex 'python3.5' and thus failed to install via apt-get install python3.5?
– Charlie Parker
Dec 16 '16 at 7:06




did you ever get E: Couldn't find any package by regex 'python3.5' and thus failed to install via apt-get install python3.5?
– Charlie Parker
Dec 16 '16 at 7:06












similar question: askubuntu.com/questions/310441/…
– Charlie Parker
Jan 16 '17 at 22:22




similar question: askubuntu.com/questions/310441/…
– Charlie Parker
Jan 16 '17 at 22:22












some good suggestions here: quora.com/…
– Charlie Parker
Jan 18 '17 at 0:19




some good suggestions here: quora.com/…
– Charlie Parker
Jan 18 '17 at 0:19




1




1




@CharlieParker Did you try installing Anaconda ?
– M. Becerra
Feb 8 '17 at 18:44




@CharlieParker Did you try installing Anaconda ?
– M. Becerra
Feb 8 '17 at 18:44










8 Answers
8






active

oldest

votes

















up vote
141
down vote



accepted










Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.



Do the usual:



sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.5


It will not overwrite your existing python3.4 which is still symlinked as python3.



DON'T change the symlink! There are apparently many system functions that don't work properly with python3.5.



I tried this and afterwards couldn't open a terminal, software updater,...



cd /usr/bin
sudo rm python3


The upgrade to Wily will adapt the meta-package python3 to point to python3.5. I don't expect any breakage, but at this point the foreign repository is not needed anymore. So to be really safe, you can purge the PPA before doing the upgrade.






share|improve this answer


















  • 5




    for noob's out there, don't symlink! also not symlinking just means you need to type python3.5 from the command line to run python 3.5
    – Chris Hawkes
    Jan 24 '16 at 1:18






  • 4




    Could you point me, how can I use 3.4's pip with this 3.5?
    – Groosha
    Apr 14 '16 at 18:38










  • tried this on osmc release on raspberri pi, did not work (probably due to 'Err ppa.launchpad.net jessie/main armhf Packages 404 Not Found'). I could not get python3.5 from the repository, only 3.4. Building from source after installing build-essential however worked.
    – verboze
    May 29 '16 at 21:08







  • 2




    @kondra007 I followed instructions from pip.pypa.io/en/stable/installing (please read the warning there) and these two commands wget https://bootstrap.pypa.io/get-pip.py; sudo python3.5 get-pip.py gave me a working pip for python 3.5 but pip3.4 is not working any more. If anyone knows better please comment
    – ndemou
    Jul 24 '16 at 12:55






  • 1




    Also to set python3.5 as the default ~$ vim ~/.bashrc and add this alias python=python3.5. then ~$source ~/.bashrc
    – Krishnadas PC
    Oct 16 '16 at 4:01


















up vote
30
down vote













This Youtube link helped me to install it.



The steps are:





sudo apt-get install libssl-dev openssl
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar xzvf Python-3.5.0.tgz
cd Python-3.5.0
./configure
make
sudo make install


To check if python is installed type python3.5 else:



sudo ln -fs /opt/Python-3.5.0/Python /usr/bin/python3.5





share|improve this answer


















  • 3




    OP said he didn't want to compile from source
    – Michael Bates
    Feb 9 '16 at 3:01






  • 2




    Yes you are right. Also compiling from source might introduce some dependency issues further down the road. But that is how I resolved it. If there is a better way I would definitely want to know.
    – joydeep bhattacharjee
    Feb 10 '16 at 7:04










  • There is slightly change in the forth command, it should be cd Python-3.5.0 instead of cd Python-3.5.0.tgz.
    – Imran
    Jun 21 '16 at 5:26






  • 3




    Consider ./configure --enable-optimizations stackoverflow.com/questions/41405728/…
    – warvariuc
    Jan 11 '17 at 7:08






  • 1




    You also need c/c++ compiler from apt-get install build-essential
    – bato3
    Oct 5 '17 at 13:58

















up vote
9
down vote













Just follow those steps (tested) :



Step 1 – Install Required Packages



Use the following command to install prerequisites for Python before installing it.



sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev


Step 2 – Download Python 3.5.2



Download Python using following command from python official site. You can also download latest version in place of specified below.



cd /usr/src
sudo wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz


Now extract the downloaded package.



sudo tar xzf Python-3.5.2.tgz


Step 3 – Compile Python Source



Use below set of commands to compile python source code on your system using altinstall.



cd Python-3.5.2
sudo ./configure
sudo make altinstall


make altinstall is used to prevent replacing the default python binary file /usr/bin/python.



Step 4 – Check the Python Version



Check the latest version installed of python using below command.



$ python3.5 -V

Python 3.5.2


Source.






share|improve this answer
















  • 2




    +1 for using altinstall by default. There's no much real scenarios where you can live just with one version. Even of systems with Python3 as default you may be forced to install Python as reversed -> Python2 instead or adding Python2.
    – erm3nda
    May 25 '17 at 15:41

















up vote
6
down vote













As far as I can tell, at least in a docker container, one can definitively apt-get python 3.



First I ran into a ubuntu container with container:



docker run -it --rm ubuntu:latest bash


then for some reason it needed to update some ubuntu stuff so I did (inside the container):



apt-get update && apt-get install -y build-essential git libjpeg-dev


and then I simply installed python3 and it seems it automatically got python 3.5:



apt-get install python3
apt-get install python3-pip


and to test if pip works lets download something:



pip3 install tensorflow


all seems to work fine for me.



Important Note: it seems that if you already have python 3.4 installed then apt-get install python3 does not work because it says you already have it. It seems that was one of my problems because I was starting from a docker image from tensorflow (in particular gcr.io/tensorflow/tensorflow:latest-devel-py3) and something in that image (I assume its that they already have python 3.4 but it might something else) didn't allow me to update my python to get python 3.5.




credit: I discovered this when I asked the following: https://stackoverflow.com/questions/42122826/can-one-use-python-3-5-in-a-docker-container-based-out-of-the-tensorflow-docker




Note: one can also just install Anaconda. For a docker example one can do:



docker pull continuumio/anaconda3
docker run -i -t continuumio/anaconda3 /bin/bash


from their official website: https://hub.docker.com/r/continuumio/anaconda3/



This solution installs python 3.6 but I am sure if you look into it there you can get python 3.5 if thats what you want.



Note: you should probably be using a virtual environment like virtual env or conda/anaconda anyway unless your using docker anyway. Just wanted to remind people.






share|improve this answer






















  • "in a docker container" is a very generic statement: it all depends which image the container is based on, for example which version of Ubuntu. Moreover, there can be minor versions like 3.5 or 3.6 that are not available in one Ubuntu version (14.04 for example)
    – giorgiosironi
    Sep 12 '17 at 8:28


















up vote
2
down vote













There are a number of newer python distributions available to install via apt-get listed in Ubuntu Packages



as an example the following versions are currently available:



python2.7



python3.2



python3.4



python3.5



python3.6



Availability varies with Ubuntu release to a degree. For example 3.5 is available for Xenial, Yakkety, and Zesty and 3.6 is available for Yakkety and Zesty but you must enable the Universe repository if not enabled to obtain them via apt-get. To check availability for your version of Ubuntu check the links above.



A quick peek indicates that this answer is also still valid as that PPA has 3.6 even for Trusty.






share|improve this answer






















  • the Python versions available in Ubuntu Repo are not the newest Python version.
    – yaitloutou
    Feb 13 '17 at 23:59










  • @yaitloutou The question says "newer" not "newest" By all means feel free to write a better answer.
    – Elder Geek
    Feb 14 '17 at 0:03











  • You are correct, but since newer relatively to what is not specified I've interpreted it as newest :)
    – yaitloutou
    Feb 14 '17 at 0:08










  • @yaitloutou Feel free and by all means write a better answer! I'm sure it would be appreciated.
    – Elder Geek
    Feb 14 '17 at 0:18










  • I've just started to get active here, and I'm still learning. Sorry if you find my comment on your answer obtrusive
    – yaitloutou
    Feb 14 '17 at 0:43

















up vote
0
down vote













I would consider using virtual environments instead of installing python versions via apt-get.



Using virtual environments, see here, are a good practice for developing with python. They let you isolate your python environment from the system installed python versions.



In addition you don't have to get sudo access while installing any library (via pip etc.).






share|improve this answer
















  • 8




    I think you need to install the version of python you want before you can use it in a virtual environment.
    – Nzbuu
    Jul 9 '16 at 11:15






  • 1




    You install the desired version of python in the virtual environment, than you change your python related path by just running the "activate" script in virtual environment.
    – devrimbaris
    Jul 12 '16 at 7:16










  • This is actually exactly what I want to do—the very first thing I tried doing after following @Nephente's answer was point to it using virtualenv -p. But it blew up with "ImportError: cannot import name 'HTTPSHandler'".
    – Michael Scheper
    Nov 2 '16 at 18:51






  • 1




    why was this downvoted? virtual envs usually work fine.
    – Charlie Parker
    Dec 16 '16 at 7:05










  • how do you install a virtual env in ubuntu (as in your suggestion) but with python 3.5?
    – Charlie Parker
    Jan 17 '17 at 0:16

















up vote
0
down vote













Conda is actively updated and allows you to install multiple python versions in managed venvs without the tedium of setting it all up yourself. Binary extension pathing problems may have been solved in many of the anaconda managed dependency/pip chains it uses.






share|improve this answer



























    up vote
    -1
    down vote













    On Ubuntu 16.04.1 LTS you have both python 2 (python), and python3 already installed.



    To update theme to the latest version, you can proceed as follows:


    1- Update the package list and upgrade all your system software to the latest version available



    sudo apt update && sudo apt -y upgrade



    2- install python-pip and python3-pip (alternative Python package installer) from Ubuntu repositories



    sudo apt install python-pip
    sudo apt install python3-pip


    2'- check the vesrions



    pip -V; pip3 -V



    3- upgrade pip (The PyPA recommended tool for installing Python packages) to the last version in PyPI (the Python Package Index)



    sudo -H pip3 install --upgrade pip 
    sudo -H pip install --upgrade pip


    3'- check the vesrions



    pip -V; pip3 -V


    you should get an output similar to:



    pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
    pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)



    4- (optionally) To be able to use a python subversion per project/application, and keep the dependencies required by different projects separated. you need to install Virtualenv



    [sudo -H] pip install virtualenv





    share|improve this answer






















    • How does this answer the question?
      – edwinksl
      Feb 14 '17 at 0:02










    • the question asks for installing "the latest Python releases" using A package manager (as opposed building from source). this is answered here. this answer also address "what issues might it create when upgrading to the next version?" and how to avoid them in 4 . btw, this is an update. the old question is already answered 2 years ago.
      – yaitloutou
      Feb 14 '17 at 0:18










    • The question is about installing the Python interpreter itself, not about pip or Python packages that can be installed using pip.
      – edwinksl
      Feb 14 '17 at 0:43










    • the Python interpreter is already installed, what still needed is to upgrade it. and this is what I've explained here. If you find the information in my answer incorrect or outdated, please let me know. and if you think that this doesn't answer the current question, as you understand it, feel free to share your knowledge, by posting another answer
      – yaitloutou
      Feb 14 '17 at 1:02






    • 1




      it is a little tangential to the question but the most upvoted answer installs a version of python without pip and getting pip to work with that answer is actually really annoying. I think this answer is useful.
      – Charlie Parker
      Feb 14 '17 at 16:06










    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f682869%2fhow-do-i-install-a-different-python-version-using-apt-get%23new-answer', 'question_page');

    );

    Post as a guest






























    8 Answers
    8






    active

    oldest

    votes








    8 Answers
    8






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    141
    down vote



    accepted










    Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.



    Do the usual:



    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt-get update
    sudo apt-get install python3.5


    It will not overwrite your existing python3.4 which is still symlinked as python3.



    DON'T change the symlink! There are apparently many system functions that don't work properly with python3.5.



    I tried this and afterwards couldn't open a terminal, software updater,...



    cd /usr/bin
    sudo rm python3


    The upgrade to Wily will adapt the meta-package python3 to point to python3.5. I don't expect any breakage, but at this point the foreign repository is not needed anymore. So to be really safe, you can purge the PPA before doing the upgrade.






    share|improve this answer


















    • 5




      for noob's out there, don't symlink! also not symlinking just means you need to type python3.5 from the command line to run python 3.5
      – Chris Hawkes
      Jan 24 '16 at 1:18






    • 4




      Could you point me, how can I use 3.4's pip with this 3.5?
      – Groosha
      Apr 14 '16 at 18:38










    • tried this on osmc release on raspberri pi, did not work (probably due to 'Err ppa.launchpad.net jessie/main armhf Packages 404 Not Found'). I could not get python3.5 from the repository, only 3.4. Building from source after installing build-essential however worked.
      – verboze
      May 29 '16 at 21:08







    • 2




      @kondra007 I followed instructions from pip.pypa.io/en/stable/installing (please read the warning there) and these two commands wget https://bootstrap.pypa.io/get-pip.py; sudo python3.5 get-pip.py gave me a working pip for python 3.5 but pip3.4 is not working any more. If anyone knows better please comment
      – ndemou
      Jul 24 '16 at 12:55






    • 1




      Also to set python3.5 as the default ~$ vim ~/.bashrc and add this alias python=python3.5. then ~$source ~/.bashrc
      – Krishnadas PC
      Oct 16 '16 at 4:01















    up vote
    141
    down vote



    accepted










    Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.



    Do the usual:



    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt-get update
    sudo apt-get install python3.5


    It will not overwrite your existing python3.4 which is still symlinked as python3.



    DON'T change the symlink! There are apparently many system functions that don't work properly with python3.5.



    I tried this and afterwards couldn't open a terminal, software updater,...



    cd /usr/bin
    sudo rm python3


    The upgrade to Wily will adapt the meta-package python3 to point to python3.5. I don't expect any breakage, but at this point the foreign repository is not needed anymore. So to be really safe, you can purge the PPA before doing the upgrade.






    share|improve this answer


















    • 5




      for noob's out there, don't symlink! also not symlinking just means you need to type python3.5 from the command line to run python 3.5
      – Chris Hawkes
      Jan 24 '16 at 1:18






    • 4




      Could you point me, how can I use 3.4's pip with this 3.5?
      – Groosha
      Apr 14 '16 at 18:38










    • tried this on osmc release on raspberri pi, did not work (probably due to 'Err ppa.launchpad.net jessie/main armhf Packages 404 Not Found'). I could not get python3.5 from the repository, only 3.4. Building from source after installing build-essential however worked.
      – verboze
      May 29 '16 at 21:08







    • 2




      @kondra007 I followed instructions from pip.pypa.io/en/stable/installing (please read the warning there) and these two commands wget https://bootstrap.pypa.io/get-pip.py; sudo python3.5 get-pip.py gave me a working pip for python 3.5 but pip3.4 is not working any more. If anyone knows better please comment
      – ndemou
      Jul 24 '16 at 12:55






    • 1




      Also to set python3.5 as the default ~$ vim ~/.bashrc and add this alias python=python3.5. then ~$source ~/.bashrc
      – Krishnadas PC
      Oct 16 '16 at 4:01













    up vote
    141
    down vote



    accepted







    up vote
    141
    down vote



    accepted






    Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.



    Do the usual:



    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt-get update
    sudo apt-get install python3.5


    It will not overwrite your existing python3.4 which is still symlinked as python3.



    DON'T change the symlink! There are apparently many system functions that don't work properly with python3.5.



    I tried this and afterwards couldn't open a terminal, software updater,...



    cd /usr/bin
    sudo rm python3


    The upgrade to Wily will adapt the meta-package python3 to point to python3.5. I don't expect any breakage, but at this point the foreign repository is not needed anymore. So to be really safe, you can purge the PPA before doing the upgrade.






    share|improve this answer














    Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.



    Do the usual:



    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt-get update
    sudo apt-get install python3.5


    It will not overwrite your existing python3.4 which is still symlinked as python3.



    DON'T change the symlink! There are apparently many system functions that don't work properly with python3.5.



    I tried this and afterwards couldn't open a terminal, software updater,...



    cd /usr/bin
    sudo rm python3


    The upgrade to Wily will adapt the meta-package python3 to point to python3.5. I don't expect any breakage, but at this point the foreign repository is not needed anymore. So to be really safe, you can purge the PPA before doing the upgrade.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Oct 11 '17 at 11:58









    Liam Baker

    146




    146










    answered Oct 8 '15 at 6:34









    Nephente

    3,64511020




    3,64511020







    • 5




      for noob's out there, don't symlink! also not symlinking just means you need to type python3.5 from the command line to run python 3.5
      – Chris Hawkes
      Jan 24 '16 at 1:18






    • 4




      Could you point me, how can I use 3.4's pip with this 3.5?
      – Groosha
      Apr 14 '16 at 18:38










    • tried this on osmc release on raspberri pi, did not work (probably due to 'Err ppa.launchpad.net jessie/main armhf Packages 404 Not Found'). I could not get python3.5 from the repository, only 3.4. Building from source after installing build-essential however worked.
      – verboze
      May 29 '16 at 21:08







    • 2




      @kondra007 I followed instructions from pip.pypa.io/en/stable/installing (please read the warning there) and these two commands wget https://bootstrap.pypa.io/get-pip.py; sudo python3.5 get-pip.py gave me a working pip for python 3.5 but pip3.4 is not working any more. If anyone knows better please comment
      – ndemou
      Jul 24 '16 at 12:55






    • 1




      Also to set python3.5 as the default ~$ vim ~/.bashrc and add this alias python=python3.5. then ~$source ~/.bashrc
      – Krishnadas PC
      Oct 16 '16 at 4:01













    • 5




      for noob's out there, don't symlink! also not symlinking just means you need to type python3.5 from the command line to run python 3.5
      – Chris Hawkes
      Jan 24 '16 at 1:18






    • 4




      Could you point me, how can I use 3.4's pip with this 3.5?
      – Groosha
      Apr 14 '16 at 18:38










    • tried this on osmc release on raspberri pi, did not work (probably due to 'Err ppa.launchpad.net jessie/main armhf Packages 404 Not Found'). I could not get python3.5 from the repository, only 3.4. Building from source after installing build-essential however worked.
      – verboze
      May 29 '16 at 21:08







    • 2




      @kondra007 I followed instructions from pip.pypa.io/en/stable/installing (please read the warning there) and these two commands wget https://bootstrap.pypa.io/get-pip.py; sudo python3.5 get-pip.py gave me a working pip for python 3.5 but pip3.4 is not working any more. If anyone knows better please comment
      – ndemou
      Jul 24 '16 at 12:55






    • 1




      Also to set python3.5 as the default ~$ vim ~/.bashrc and add this alias python=python3.5. then ~$source ~/.bashrc
      – Krishnadas PC
      Oct 16 '16 at 4:01








    5




    5




    for noob's out there, don't symlink! also not symlinking just means you need to type python3.5 from the command line to run python 3.5
    – Chris Hawkes
    Jan 24 '16 at 1:18




    for noob's out there, don't symlink! also not symlinking just means you need to type python3.5 from the command line to run python 3.5
    – Chris Hawkes
    Jan 24 '16 at 1:18




    4




    4




    Could you point me, how can I use 3.4's pip with this 3.5?
    – Groosha
    Apr 14 '16 at 18:38




    Could you point me, how can I use 3.4's pip with this 3.5?
    – Groosha
    Apr 14 '16 at 18:38












    tried this on osmc release on raspberri pi, did not work (probably due to 'Err ppa.launchpad.net jessie/main armhf Packages 404 Not Found'). I could not get python3.5 from the repository, only 3.4. Building from source after installing build-essential however worked.
    – verboze
    May 29 '16 at 21:08





    tried this on osmc release on raspberri pi, did not work (probably due to 'Err ppa.launchpad.net jessie/main armhf Packages 404 Not Found'). I could not get python3.5 from the repository, only 3.4. Building from source after installing build-essential however worked.
    – verboze
    May 29 '16 at 21:08





    2




    2




    @kondra007 I followed instructions from pip.pypa.io/en/stable/installing (please read the warning there) and these two commands wget https://bootstrap.pypa.io/get-pip.py; sudo python3.5 get-pip.py gave me a working pip for python 3.5 but pip3.4 is not working any more. If anyone knows better please comment
    – ndemou
    Jul 24 '16 at 12:55




    @kondra007 I followed instructions from pip.pypa.io/en/stable/installing (please read the warning there) and these two commands wget https://bootstrap.pypa.io/get-pip.py; sudo python3.5 get-pip.py gave me a working pip for python 3.5 but pip3.4 is not working any more. If anyone knows better please comment
    – ndemou
    Jul 24 '16 at 12:55




    1




    1




    Also to set python3.5 as the default ~$ vim ~/.bashrc and add this alias python=python3.5. then ~$source ~/.bashrc
    – Krishnadas PC
    Oct 16 '16 at 4:01





    Also to set python3.5 as the default ~$ vim ~/.bashrc and add this alias python=python3.5. then ~$source ~/.bashrc
    – Krishnadas PC
    Oct 16 '16 at 4:01













    up vote
    30
    down vote













    This Youtube link helped me to install it.



    The steps are:





    sudo apt-get install libssl-dev openssl
    wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
    tar xzvf Python-3.5.0.tgz
    cd Python-3.5.0
    ./configure
    make
    sudo make install


    To check if python is installed type python3.5 else:



    sudo ln -fs /opt/Python-3.5.0/Python /usr/bin/python3.5





    share|improve this answer


















    • 3




      OP said he didn't want to compile from source
      – Michael Bates
      Feb 9 '16 at 3:01






    • 2




      Yes you are right. Also compiling from source might introduce some dependency issues further down the road. But that is how I resolved it. If there is a better way I would definitely want to know.
      – joydeep bhattacharjee
      Feb 10 '16 at 7:04










    • There is slightly change in the forth command, it should be cd Python-3.5.0 instead of cd Python-3.5.0.tgz.
      – Imran
      Jun 21 '16 at 5:26






    • 3




      Consider ./configure --enable-optimizations stackoverflow.com/questions/41405728/…
      – warvariuc
      Jan 11 '17 at 7:08






    • 1




      You also need c/c++ compiler from apt-get install build-essential
      – bato3
      Oct 5 '17 at 13:58














    up vote
    30
    down vote













    This Youtube link helped me to install it.



    The steps are:





    sudo apt-get install libssl-dev openssl
    wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
    tar xzvf Python-3.5.0.tgz
    cd Python-3.5.0
    ./configure
    make
    sudo make install


    To check if python is installed type python3.5 else:



    sudo ln -fs /opt/Python-3.5.0/Python /usr/bin/python3.5





    share|improve this answer


















    • 3




      OP said he didn't want to compile from source
      – Michael Bates
      Feb 9 '16 at 3:01






    • 2




      Yes you are right. Also compiling from source might introduce some dependency issues further down the road. But that is how I resolved it. If there is a better way I would definitely want to know.
      – joydeep bhattacharjee
      Feb 10 '16 at 7:04










    • There is slightly change in the forth command, it should be cd Python-3.5.0 instead of cd Python-3.5.0.tgz.
      – Imran
      Jun 21 '16 at 5:26






    • 3




      Consider ./configure --enable-optimizations stackoverflow.com/questions/41405728/…
      – warvariuc
      Jan 11 '17 at 7:08






    • 1




      You also need c/c++ compiler from apt-get install build-essential
      – bato3
      Oct 5 '17 at 13:58












    up vote
    30
    down vote










    up vote
    30
    down vote









    This Youtube link helped me to install it.



    The steps are:





    sudo apt-get install libssl-dev openssl
    wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
    tar xzvf Python-3.5.0.tgz
    cd Python-3.5.0
    ./configure
    make
    sudo make install


    To check if python is installed type python3.5 else:



    sudo ln -fs /opt/Python-3.5.0/Python /usr/bin/python3.5





    share|improve this answer














    This Youtube link helped me to install it.



    The steps are:





    sudo apt-get install libssl-dev openssl
    wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
    tar xzvf Python-3.5.0.tgz
    cd Python-3.5.0
    ./configure
    make
    sudo make install


    To check if python is installed type python3.5 else:



    sudo ln -fs /opt/Python-3.5.0/Python /usr/bin/python3.5






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 14 '16 at 8:59









    Tshilidzi Mudau

    3,37921527




    3,37921527










    answered Jan 31 '16 at 5:33









    joydeep bhattacharjee

    41946




    41946







    • 3




      OP said he didn't want to compile from source
      – Michael Bates
      Feb 9 '16 at 3:01






    • 2




      Yes you are right. Also compiling from source might introduce some dependency issues further down the road. But that is how I resolved it. If there is a better way I would definitely want to know.
      – joydeep bhattacharjee
      Feb 10 '16 at 7:04










    • There is slightly change in the forth command, it should be cd Python-3.5.0 instead of cd Python-3.5.0.tgz.
      – Imran
      Jun 21 '16 at 5:26






    • 3




      Consider ./configure --enable-optimizations stackoverflow.com/questions/41405728/…
      – warvariuc
      Jan 11 '17 at 7:08






    • 1




      You also need c/c++ compiler from apt-get install build-essential
      – bato3
      Oct 5 '17 at 13:58












    • 3




      OP said he didn't want to compile from source
      – Michael Bates
      Feb 9 '16 at 3:01






    • 2




      Yes you are right. Also compiling from source might introduce some dependency issues further down the road. But that is how I resolved it. If there is a better way I would definitely want to know.
      – joydeep bhattacharjee
      Feb 10 '16 at 7:04










    • There is slightly change in the forth command, it should be cd Python-3.5.0 instead of cd Python-3.5.0.tgz.
      – Imran
      Jun 21 '16 at 5:26






    • 3




      Consider ./configure --enable-optimizations stackoverflow.com/questions/41405728/…
      – warvariuc
      Jan 11 '17 at 7:08






    • 1




      You also need c/c++ compiler from apt-get install build-essential
      – bato3
      Oct 5 '17 at 13:58







    3




    3




    OP said he didn't want to compile from source
    – Michael Bates
    Feb 9 '16 at 3:01




    OP said he didn't want to compile from source
    – Michael Bates
    Feb 9 '16 at 3:01




    2




    2




    Yes you are right. Also compiling from source might introduce some dependency issues further down the road. But that is how I resolved it. If there is a better way I would definitely want to know.
    – joydeep bhattacharjee
    Feb 10 '16 at 7:04




    Yes you are right. Also compiling from source might introduce some dependency issues further down the road. But that is how I resolved it. If there is a better way I would definitely want to know.
    – joydeep bhattacharjee
    Feb 10 '16 at 7:04












    There is slightly change in the forth command, it should be cd Python-3.5.0 instead of cd Python-3.5.0.tgz.
    – Imran
    Jun 21 '16 at 5:26




    There is slightly change in the forth command, it should be cd Python-3.5.0 instead of cd Python-3.5.0.tgz.
    – Imran
    Jun 21 '16 at 5:26




    3




    3




    Consider ./configure --enable-optimizations stackoverflow.com/questions/41405728/…
    – warvariuc
    Jan 11 '17 at 7:08




    Consider ./configure --enable-optimizations stackoverflow.com/questions/41405728/…
    – warvariuc
    Jan 11 '17 at 7:08




    1




    1




    You also need c/c++ compiler from apt-get install build-essential
    – bato3
    Oct 5 '17 at 13:58




    You also need c/c++ compiler from apt-get install build-essential
    – bato3
    Oct 5 '17 at 13:58










    up vote
    9
    down vote













    Just follow those steps (tested) :



    Step 1 – Install Required Packages



    Use the following command to install prerequisites for Python before installing it.



    sudo apt-get install build-essential checkinstall
    sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev


    Step 2 – Download Python 3.5.2



    Download Python using following command from python official site. You can also download latest version in place of specified below.



    cd /usr/src
    sudo wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz


    Now extract the downloaded package.



    sudo tar xzf Python-3.5.2.tgz


    Step 3 – Compile Python Source



    Use below set of commands to compile python source code on your system using altinstall.



    cd Python-3.5.2
    sudo ./configure
    sudo make altinstall


    make altinstall is used to prevent replacing the default python binary file /usr/bin/python.



    Step 4 – Check the Python Version



    Check the latest version installed of python using below command.



    $ python3.5 -V

    Python 3.5.2


    Source.






    share|improve this answer
















    • 2




      +1 for using altinstall by default. There's no much real scenarios where you can live just with one version. Even of systems with Python3 as default you may be forced to install Python as reversed -> Python2 instead or adding Python2.
      – erm3nda
      May 25 '17 at 15:41














    up vote
    9
    down vote













    Just follow those steps (tested) :



    Step 1 – Install Required Packages



    Use the following command to install prerequisites for Python before installing it.



    sudo apt-get install build-essential checkinstall
    sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev


    Step 2 – Download Python 3.5.2



    Download Python using following command from python official site. You can also download latest version in place of specified below.



    cd /usr/src
    sudo wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz


    Now extract the downloaded package.



    sudo tar xzf Python-3.5.2.tgz


    Step 3 – Compile Python Source



    Use below set of commands to compile python source code on your system using altinstall.



    cd Python-3.5.2
    sudo ./configure
    sudo make altinstall


    make altinstall is used to prevent replacing the default python binary file /usr/bin/python.



    Step 4 – Check the Python Version



    Check the latest version installed of python using below command.



    $ python3.5 -V

    Python 3.5.2


    Source.






    share|improve this answer
















    • 2




      +1 for using altinstall by default. There's no much real scenarios where you can live just with one version. Even of systems with Python3 as default you may be forced to install Python as reversed -> Python2 instead or adding Python2.
      – erm3nda
      May 25 '17 at 15:41












    up vote
    9
    down vote










    up vote
    9
    down vote









    Just follow those steps (tested) :



    Step 1 – Install Required Packages



    Use the following command to install prerequisites for Python before installing it.



    sudo apt-get install build-essential checkinstall
    sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev


    Step 2 – Download Python 3.5.2



    Download Python using following command from python official site. You can also download latest version in place of specified below.



    cd /usr/src
    sudo wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz


    Now extract the downloaded package.



    sudo tar xzf Python-3.5.2.tgz


    Step 3 – Compile Python Source



    Use below set of commands to compile python source code on your system using altinstall.



    cd Python-3.5.2
    sudo ./configure
    sudo make altinstall


    make altinstall is used to prevent replacing the default python binary file /usr/bin/python.



    Step 4 – Check the Python Version



    Check the latest version installed of python using below command.



    $ python3.5 -V

    Python 3.5.2


    Source.






    share|improve this answer












    Just follow those steps (tested) :



    Step 1 – Install Required Packages



    Use the following command to install prerequisites for Python before installing it.



    sudo apt-get install build-essential checkinstall
    sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev


    Step 2 – Download Python 3.5.2



    Download Python using following command from python official site. You can also download latest version in place of specified below.



    cd /usr/src
    sudo wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz


    Now extract the downloaded package.



    sudo tar xzf Python-3.5.2.tgz


    Step 3 – Compile Python Source



    Use below set of commands to compile python source code on your system using altinstall.



    cd Python-3.5.2
    sudo ./configure
    sudo make altinstall


    make altinstall is used to prevent replacing the default python binary file /usr/bin/python.



    Step 4 – Check the Python Version



    Check the latest version installed of python using below command.



    $ python3.5 -V

    Python 3.5.2


    Source.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 8 '17 at 16:47









    Bilal

    2,5581429




    2,5581429







    • 2




      +1 for using altinstall by default. There's no much real scenarios where you can live just with one version. Even of systems with Python3 as default you may be forced to install Python as reversed -> Python2 instead or adding Python2.
      – erm3nda
      May 25 '17 at 15:41












    • 2




      +1 for using altinstall by default. There's no much real scenarios where you can live just with one version. Even of systems with Python3 as default you may be forced to install Python as reversed -> Python2 instead or adding Python2.
      – erm3nda
      May 25 '17 at 15:41







    2




    2




    +1 for using altinstall by default. There's no much real scenarios where you can live just with one version. Even of systems with Python3 as default you may be forced to install Python as reversed -> Python2 instead or adding Python2.
    – erm3nda
    May 25 '17 at 15:41




    +1 for using altinstall by default. There's no much real scenarios where you can live just with one version. Even of systems with Python3 as default you may be forced to install Python as reversed -> Python2 instead or adding Python2.
    – erm3nda
    May 25 '17 at 15:41










    up vote
    6
    down vote













    As far as I can tell, at least in a docker container, one can definitively apt-get python 3.



    First I ran into a ubuntu container with container:



    docker run -it --rm ubuntu:latest bash


    then for some reason it needed to update some ubuntu stuff so I did (inside the container):



    apt-get update && apt-get install -y build-essential git libjpeg-dev


    and then I simply installed python3 and it seems it automatically got python 3.5:



    apt-get install python3
    apt-get install python3-pip


    and to test if pip works lets download something:



    pip3 install tensorflow


    all seems to work fine for me.



    Important Note: it seems that if you already have python 3.4 installed then apt-get install python3 does not work because it says you already have it. It seems that was one of my problems because I was starting from a docker image from tensorflow (in particular gcr.io/tensorflow/tensorflow:latest-devel-py3) and something in that image (I assume its that they already have python 3.4 but it might something else) didn't allow me to update my python to get python 3.5.




    credit: I discovered this when I asked the following: https://stackoverflow.com/questions/42122826/can-one-use-python-3-5-in-a-docker-container-based-out-of-the-tensorflow-docker




    Note: one can also just install Anaconda. For a docker example one can do:



    docker pull continuumio/anaconda3
    docker run -i -t continuumio/anaconda3 /bin/bash


    from their official website: https://hub.docker.com/r/continuumio/anaconda3/



    This solution installs python 3.6 but I am sure if you look into it there you can get python 3.5 if thats what you want.



    Note: you should probably be using a virtual environment like virtual env or conda/anaconda anyway unless your using docker anyway. Just wanted to remind people.






    share|improve this answer






















    • "in a docker container" is a very generic statement: it all depends which image the container is based on, for example which version of Ubuntu. Moreover, there can be minor versions like 3.5 or 3.6 that are not available in one Ubuntu version (14.04 for example)
      – giorgiosironi
      Sep 12 '17 at 8:28















    up vote
    6
    down vote













    As far as I can tell, at least in a docker container, one can definitively apt-get python 3.



    First I ran into a ubuntu container with container:



    docker run -it --rm ubuntu:latest bash


    then for some reason it needed to update some ubuntu stuff so I did (inside the container):



    apt-get update && apt-get install -y build-essential git libjpeg-dev


    and then I simply installed python3 and it seems it automatically got python 3.5:



    apt-get install python3
    apt-get install python3-pip


    and to test if pip works lets download something:



    pip3 install tensorflow


    all seems to work fine for me.



    Important Note: it seems that if you already have python 3.4 installed then apt-get install python3 does not work because it says you already have it. It seems that was one of my problems because I was starting from a docker image from tensorflow (in particular gcr.io/tensorflow/tensorflow:latest-devel-py3) and something in that image (I assume its that they already have python 3.4 but it might something else) didn't allow me to update my python to get python 3.5.




    credit: I discovered this when I asked the following: https://stackoverflow.com/questions/42122826/can-one-use-python-3-5-in-a-docker-container-based-out-of-the-tensorflow-docker




    Note: one can also just install Anaconda. For a docker example one can do:



    docker pull continuumio/anaconda3
    docker run -i -t continuumio/anaconda3 /bin/bash


    from their official website: https://hub.docker.com/r/continuumio/anaconda3/



    This solution installs python 3.6 but I am sure if you look into it there you can get python 3.5 if thats what you want.



    Note: you should probably be using a virtual environment like virtual env or conda/anaconda anyway unless your using docker anyway. Just wanted to remind people.






    share|improve this answer






















    • "in a docker container" is a very generic statement: it all depends which image the container is based on, for example which version of Ubuntu. Moreover, there can be minor versions like 3.5 or 3.6 that are not available in one Ubuntu version (14.04 for example)
      – giorgiosironi
      Sep 12 '17 at 8:28













    up vote
    6
    down vote










    up vote
    6
    down vote









    As far as I can tell, at least in a docker container, one can definitively apt-get python 3.



    First I ran into a ubuntu container with container:



    docker run -it --rm ubuntu:latest bash


    then for some reason it needed to update some ubuntu stuff so I did (inside the container):



    apt-get update && apt-get install -y build-essential git libjpeg-dev


    and then I simply installed python3 and it seems it automatically got python 3.5:



    apt-get install python3
    apt-get install python3-pip


    and to test if pip works lets download something:



    pip3 install tensorflow


    all seems to work fine for me.



    Important Note: it seems that if you already have python 3.4 installed then apt-get install python3 does not work because it says you already have it. It seems that was one of my problems because I was starting from a docker image from tensorflow (in particular gcr.io/tensorflow/tensorflow:latest-devel-py3) and something in that image (I assume its that they already have python 3.4 but it might something else) didn't allow me to update my python to get python 3.5.




    credit: I discovered this when I asked the following: https://stackoverflow.com/questions/42122826/can-one-use-python-3-5-in-a-docker-container-based-out-of-the-tensorflow-docker




    Note: one can also just install Anaconda. For a docker example one can do:



    docker pull continuumio/anaconda3
    docker run -i -t continuumio/anaconda3 /bin/bash


    from their official website: https://hub.docker.com/r/continuumio/anaconda3/



    This solution installs python 3.6 but I am sure if you look into it there you can get python 3.5 if thats what you want.



    Note: you should probably be using a virtual environment like virtual env or conda/anaconda anyway unless your using docker anyway. Just wanted to remind people.






    share|improve this answer














    As far as I can tell, at least in a docker container, one can definitively apt-get python 3.



    First I ran into a ubuntu container with container:



    docker run -it --rm ubuntu:latest bash


    then for some reason it needed to update some ubuntu stuff so I did (inside the container):



    apt-get update && apt-get install -y build-essential git libjpeg-dev


    and then I simply installed python3 and it seems it automatically got python 3.5:



    apt-get install python3
    apt-get install python3-pip


    and to test if pip works lets download something:



    pip3 install tensorflow


    all seems to work fine for me.



    Important Note: it seems that if you already have python 3.4 installed then apt-get install python3 does not work because it says you already have it. It seems that was one of my problems because I was starting from a docker image from tensorflow (in particular gcr.io/tensorflow/tensorflow:latest-devel-py3) and something in that image (I assume its that they already have python 3.4 but it might something else) didn't allow me to update my python to get python 3.5.




    credit: I discovered this when I asked the following: https://stackoverflow.com/questions/42122826/can-one-use-python-3-5-in-a-docker-container-based-out-of-the-tensorflow-docker




    Note: one can also just install Anaconda. For a docker example one can do:



    docker pull continuumio/anaconda3
    docker run -i -t continuumio/anaconda3 /bin/bash


    from their official website: https://hub.docker.com/r/continuumio/anaconda3/



    This solution installs python 3.6 but I am sure if you look into it there you can get python 3.5 if thats what you want.



    Note: you should probably be using a virtual environment like virtual env or conda/anaconda anyway unless your using docker anyway. Just wanted to remind people.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited May 23 '17 at 12:39









    Community♦

    1




    1










    answered Feb 9 '17 at 19:56









    Charlie Parker

    11115




    11115











    • "in a docker container" is a very generic statement: it all depends which image the container is based on, for example which version of Ubuntu. Moreover, there can be minor versions like 3.5 or 3.6 that are not available in one Ubuntu version (14.04 for example)
      – giorgiosironi
      Sep 12 '17 at 8:28

















    • "in a docker container" is a very generic statement: it all depends which image the container is based on, for example which version of Ubuntu. Moreover, there can be minor versions like 3.5 or 3.6 that are not available in one Ubuntu version (14.04 for example)
      – giorgiosironi
      Sep 12 '17 at 8:28
















    "in a docker container" is a very generic statement: it all depends which image the container is based on, for example which version of Ubuntu. Moreover, there can be minor versions like 3.5 or 3.6 that are not available in one Ubuntu version (14.04 for example)
    – giorgiosironi
    Sep 12 '17 at 8:28





    "in a docker container" is a very generic statement: it all depends which image the container is based on, for example which version of Ubuntu. Moreover, there can be minor versions like 3.5 or 3.6 that are not available in one Ubuntu version (14.04 for example)
    – giorgiosironi
    Sep 12 '17 at 8:28











    up vote
    2
    down vote













    There are a number of newer python distributions available to install via apt-get listed in Ubuntu Packages



    as an example the following versions are currently available:



    python2.7



    python3.2



    python3.4



    python3.5



    python3.6



    Availability varies with Ubuntu release to a degree. For example 3.5 is available for Xenial, Yakkety, and Zesty and 3.6 is available for Yakkety and Zesty but you must enable the Universe repository if not enabled to obtain them via apt-get. To check availability for your version of Ubuntu check the links above.



    A quick peek indicates that this answer is also still valid as that PPA has 3.6 even for Trusty.






    share|improve this answer






















    • the Python versions available in Ubuntu Repo are not the newest Python version.
      – yaitloutou
      Feb 13 '17 at 23:59










    • @yaitloutou The question says "newer" not "newest" By all means feel free to write a better answer.
      – Elder Geek
      Feb 14 '17 at 0:03











    • You are correct, but since newer relatively to what is not specified I've interpreted it as newest :)
      – yaitloutou
      Feb 14 '17 at 0:08










    • @yaitloutou Feel free and by all means write a better answer! I'm sure it would be appreciated.
      – Elder Geek
      Feb 14 '17 at 0:18










    • I've just started to get active here, and I'm still learning. Sorry if you find my comment on your answer obtrusive
      – yaitloutou
      Feb 14 '17 at 0:43














    up vote
    2
    down vote













    There are a number of newer python distributions available to install via apt-get listed in Ubuntu Packages



    as an example the following versions are currently available:



    python2.7



    python3.2



    python3.4



    python3.5



    python3.6



    Availability varies with Ubuntu release to a degree. For example 3.5 is available for Xenial, Yakkety, and Zesty and 3.6 is available for Yakkety and Zesty but you must enable the Universe repository if not enabled to obtain them via apt-get. To check availability for your version of Ubuntu check the links above.



    A quick peek indicates that this answer is also still valid as that PPA has 3.6 even for Trusty.






    share|improve this answer






















    • the Python versions available in Ubuntu Repo are not the newest Python version.
      – yaitloutou
      Feb 13 '17 at 23:59










    • @yaitloutou The question says "newer" not "newest" By all means feel free to write a better answer.
      – Elder Geek
      Feb 14 '17 at 0:03











    • You are correct, but since newer relatively to what is not specified I've interpreted it as newest :)
      – yaitloutou
      Feb 14 '17 at 0:08










    • @yaitloutou Feel free and by all means write a better answer! I'm sure it would be appreciated.
      – Elder Geek
      Feb 14 '17 at 0:18










    • I've just started to get active here, and I'm still learning. Sorry if you find my comment on your answer obtrusive
      – yaitloutou
      Feb 14 '17 at 0:43












    up vote
    2
    down vote










    up vote
    2
    down vote









    There are a number of newer python distributions available to install via apt-get listed in Ubuntu Packages



    as an example the following versions are currently available:



    python2.7



    python3.2



    python3.4



    python3.5



    python3.6



    Availability varies with Ubuntu release to a degree. For example 3.5 is available for Xenial, Yakkety, and Zesty and 3.6 is available for Yakkety and Zesty but you must enable the Universe repository if not enabled to obtain them via apt-get. To check availability for your version of Ubuntu check the links above.



    A quick peek indicates that this answer is also still valid as that PPA has 3.6 even for Trusty.






    share|improve this answer














    There are a number of newer python distributions available to install via apt-get listed in Ubuntu Packages



    as an example the following versions are currently available:



    python2.7



    python3.2



    python3.4



    python3.5



    python3.6



    Availability varies with Ubuntu release to a degree. For example 3.5 is available for Xenial, Yakkety, and Zesty and 3.6 is available for Yakkety and Zesty but you must enable the Universe repository if not enabled to obtain them via apt-get. To check availability for your version of Ubuntu check the links above.



    A quick peek indicates that this answer is also still valid as that PPA has 3.6 even for Trusty.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:25









    Community♦

    1




    1










    answered Feb 13 '17 at 23:24









    Elder Geek

    25.2k948120




    25.2k948120











    • the Python versions available in Ubuntu Repo are not the newest Python version.
      – yaitloutou
      Feb 13 '17 at 23:59










    • @yaitloutou The question says "newer" not "newest" By all means feel free to write a better answer.
      – Elder Geek
      Feb 14 '17 at 0:03











    • You are correct, but since newer relatively to what is not specified I've interpreted it as newest :)
      – yaitloutou
      Feb 14 '17 at 0:08










    • @yaitloutou Feel free and by all means write a better answer! I'm sure it would be appreciated.
      – Elder Geek
      Feb 14 '17 at 0:18










    • I've just started to get active here, and I'm still learning. Sorry if you find my comment on your answer obtrusive
      – yaitloutou
      Feb 14 '17 at 0:43
















    • the Python versions available in Ubuntu Repo are not the newest Python version.
      – yaitloutou
      Feb 13 '17 at 23:59










    • @yaitloutou The question says "newer" not "newest" By all means feel free to write a better answer.
      – Elder Geek
      Feb 14 '17 at 0:03











    • You are correct, but since newer relatively to what is not specified I've interpreted it as newest :)
      – yaitloutou
      Feb 14 '17 at 0:08










    • @yaitloutou Feel free and by all means write a better answer! I'm sure it would be appreciated.
      – Elder Geek
      Feb 14 '17 at 0:18










    • I've just started to get active here, and I'm still learning. Sorry if you find my comment on your answer obtrusive
      – yaitloutou
      Feb 14 '17 at 0:43















    the Python versions available in Ubuntu Repo are not the newest Python version.
    – yaitloutou
    Feb 13 '17 at 23:59




    the Python versions available in Ubuntu Repo are not the newest Python version.
    – yaitloutou
    Feb 13 '17 at 23:59












    @yaitloutou The question says "newer" not "newest" By all means feel free to write a better answer.
    – Elder Geek
    Feb 14 '17 at 0:03





    @yaitloutou The question says "newer" not "newest" By all means feel free to write a better answer.
    – Elder Geek
    Feb 14 '17 at 0:03













    You are correct, but since newer relatively to what is not specified I've interpreted it as newest :)
    – yaitloutou
    Feb 14 '17 at 0:08




    You are correct, but since newer relatively to what is not specified I've interpreted it as newest :)
    – yaitloutou
    Feb 14 '17 at 0:08












    @yaitloutou Feel free and by all means write a better answer! I'm sure it would be appreciated.
    – Elder Geek
    Feb 14 '17 at 0:18




    @yaitloutou Feel free and by all means write a better answer! I'm sure it would be appreciated.
    – Elder Geek
    Feb 14 '17 at 0:18












    I've just started to get active here, and I'm still learning. Sorry if you find my comment on your answer obtrusive
    – yaitloutou
    Feb 14 '17 at 0:43




    I've just started to get active here, and I'm still learning. Sorry if you find my comment on your answer obtrusive
    – yaitloutou
    Feb 14 '17 at 0:43










    up vote
    0
    down vote













    I would consider using virtual environments instead of installing python versions via apt-get.



    Using virtual environments, see here, are a good practice for developing with python. They let you isolate your python environment from the system installed python versions.



    In addition you don't have to get sudo access while installing any library (via pip etc.).






    share|improve this answer
















    • 8




      I think you need to install the version of python you want before you can use it in a virtual environment.
      – Nzbuu
      Jul 9 '16 at 11:15






    • 1




      You install the desired version of python in the virtual environment, than you change your python related path by just running the "activate" script in virtual environment.
      – devrimbaris
      Jul 12 '16 at 7:16










    • This is actually exactly what I want to do—the very first thing I tried doing after following @Nephente's answer was point to it using virtualenv -p. But it blew up with "ImportError: cannot import name 'HTTPSHandler'".
      – Michael Scheper
      Nov 2 '16 at 18:51






    • 1




      why was this downvoted? virtual envs usually work fine.
      – Charlie Parker
      Dec 16 '16 at 7:05










    • how do you install a virtual env in ubuntu (as in your suggestion) but with python 3.5?
      – Charlie Parker
      Jan 17 '17 at 0:16














    up vote
    0
    down vote













    I would consider using virtual environments instead of installing python versions via apt-get.



    Using virtual environments, see here, are a good practice for developing with python. They let you isolate your python environment from the system installed python versions.



    In addition you don't have to get sudo access while installing any library (via pip etc.).






    share|improve this answer
















    • 8




      I think you need to install the version of python you want before you can use it in a virtual environment.
      – Nzbuu
      Jul 9 '16 at 11:15






    • 1




      You install the desired version of python in the virtual environment, than you change your python related path by just running the "activate" script in virtual environment.
      – devrimbaris
      Jul 12 '16 at 7:16










    • This is actually exactly what I want to do—the very first thing I tried doing after following @Nephente's answer was point to it using virtualenv -p. But it blew up with "ImportError: cannot import name 'HTTPSHandler'".
      – Michael Scheper
      Nov 2 '16 at 18:51






    • 1




      why was this downvoted? virtual envs usually work fine.
      – Charlie Parker
      Dec 16 '16 at 7:05










    • how do you install a virtual env in ubuntu (as in your suggestion) but with python 3.5?
      – Charlie Parker
      Jan 17 '17 at 0:16












    up vote
    0
    down vote










    up vote
    0
    down vote









    I would consider using virtual environments instead of installing python versions via apt-get.



    Using virtual environments, see here, are a good practice for developing with python. They let you isolate your python environment from the system installed python versions.



    In addition you don't have to get sudo access while installing any library (via pip etc.).






    share|improve this answer












    I would consider using virtual environments instead of installing python versions via apt-get.



    Using virtual environments, see here, are a good practice for developing with python. They let you isolate your python environment from the system installed python versions.



    In addition you don't have to get sudo access while installing any library (via pip etc.).







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 21 '16 at 6:20









    devrimbaris

    1013




    1013







    • 8




      I think you need to install the version of python you want before you can use it in a virtual environment.
      – Nzbuu
      Jul 9 '16 at 11:15






    • 1




      You install the desired version of python in the virtual environment, than you change your python related path by just running the "activate" script in virtual environment.
      – devrimbaris
      Jul 12 '16 at 7:16










    • This is actually exactly what I want to do—the very first thing I tried doing after following @Nephente's answer was point to it using virtualenv -p. But it blew up with "ImportError: cannot import name 'HTTPSHandler'".
      – Michael Scheper
      Nov 2 '16 at 18:51






    • 1




      why was this downvoted? virtual envs usually work fine.
      – Charlie Parker
      Dec 16 '16 at 7:05










    • how do you install a virtual env in ubuntu (as in your suggestion) but with python 3.5?
      – Charlie Parker
      Jan 17 '17 at 0:16












    • 8




      I think you need to install the version of python you want before you can use it in a virtual environment.
      – Nzbuu
      Jul 9 '16 at 11:15






    • 1




      You install the desired version of python in the virtual environment, than you change your python related path by just running the "activate" script in virtual environment.
      – devrimbaris
      Jul 12 '16 at 7:16










    • This is actually exactly what I want to do—the very first thing I tried doing after following @Nephente's answer was point to it using virtualenv -p. But it blew up with "ImportError: cannot import name 'HTTPSHandler'".
      – Michael Scheper
      Nov 2 '16 at 18:51






    • 1




      why was this downvoted? virtual envs usually work fine.
      – Charlie Parker
      Dec 16 '16 at 7:05










    • how do you install a virtual env in ubuntu (as in your suggestion) but with python 3.5?
      – Charlie Parker
      Jan 17 '17 at 0:16







    8




    8




    I think you need to install the version of python you want before you can use it in a virtual environment.
    – Nzbuu
    Jul 9 '16 at 11:15




    I think you need to install the version of python you want before you can use it in a virtual environment.
    – Nzbuu
    Jul 9 '16 at 11:15




    1




    1




    You install the desired version of python in the virtual environment, than you change your python related path by just running the "activate" script in virtual environment.
    – devrimbaris
    Jul 12 '16 at 7:16




    You install the desired version of python in the virtual environment, than you change your python related path by just running the "activate" script in virtual environment.
    – devrimbaris
    Jul 12 '16 at 7:16












    This is actually exactly what I want to do—the very first thing I tried doing after following @Nephente's answer was point to it using virtualenv -p. But it blew up with "ImportError: cannot import name 'HTTPSHandler'".
    – Michael Scheper
    Nov 2 '16 at 18:51




    This is actually exactly what I want to do—the very first thing I tried doing after following @Nephente's answer was point to it using virtualenv -p. But it blew up with "ImportError: cannot import name 'HTTPSHandler'".
    – Michael Scheper
    Nov 2 '16 at 18:51




    1




    1




    why was this downvoted? virtual envs usually work fine.
    – Charlie Parker
    Dec 16 '16 at 7:05




    why was this downvoted? virtual envs usually work fine.
    – Charlie Parker
    Dec 16 '16 at 7:05












    how do you install a virtual env in ubuntu (as in your suggestion) but with python 3.5?
    – Charlie Parker
    Jan 17 '17 at 0:16




    how do you install a virtual env in ubuntu (as in your suggestion) but with python 3.5?
    – Charlie Parker
    Jan 17 '17 at 0:16










    up vote
    0
    down vote













    Conda is actively updated and allows you to install multiple python versions in managed venvs without the tedium of setting it all up yourself. Binary extension pathing problems may have been solved in many of the anaconda managed dependency/pip chains it uses.






    share|improve this answer
























      up vote
      0
      down vote













      Conda is actively updated and allows you to install multiple python versions in managed venvs without the tedium of setting it all up yourself. Binary extension pathing problems may have been solved in many of the anaconda managed dependency/pip chains it uses.






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Conda is actively updated and allows you to install multiple python versions in managed venvs without the tedium of setting it all up yourself. Binary extension pathing problems may have been solved in many of the anaconda managed dependency/pip chains it uses.






        share|improve this answer












        Conda is actively updated and allows you to install multiple python versions in managed venvs without the tedium of setting it all up yourself. Binary extension pathing problems may have been solved in many of the anaconda managed dependency/pip chains it uses.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 10 '17 at 19:55









        RobotHumans

        22.3k358101




        22.3k358101




















            up vote
            -1
            down vote













            On Ubuntu 16.04.1 LTS you have both python 2 (python), and python3 already installed.



            To update theme to the latest version, you can proceed as follows:


            1- Update the package list and upgrade all your system software to the latest version available



            sudo apt update && sudo apt -y upgrade



            2- install python-pip and python3-pip (alternative Python package installer) from Ubuntu repositories



            sudo apt install python-pip
            sudo apt install python3-pip


            2'- check the vesrions



            pip -V; pip3 -V



            3- upgrade pip (The PyPA recommended tool for installing Python packages) to the last version in PyPI (the Python Package Index)



            sudo -H pip3 install --upgrade pip 
            sudo -H pip install --upgrade pip


            3'- check the vesrions



            pip -V; pip3 -V


            you should get an output similar to:



            pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
            pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)



            4- (optionally) To be able to use a python subversion per project/application, and keep the dependencies required by different projects separated. you need to install Virtualenv



            [sudo -H] pip install virtualenv





            share|improve this answer






















            • How does this answer the question?
              – edwinksl
              Feb 14 '17 at 0:02










            • the question asks for installing "the latest Python releases" using A package manager (as opposed building from source). this is answered here. this answer also address "what issues might it create when upgrading to the next version?" and how to avoid them in 4 . btw, this is an update. the old question is already answered 2 years ago.
              – yaitloutou
              Feb 14 '17 at 0:18










            • The question is about installing the Python interpreter itself, not about pip or Python packages that can be installed using pip.
              – edwinksl
              Feb 14 '17 at 0:43










            • the Python interpreter is already installed, what still needed is to upgrade it. and this is what I've explained here. If you find the information in my answer incorrect or outdated, please let me know. and if you think that this doesn't answer the current question, as you understand it, feel free to share your knowledge, by posting another answer
              – yaitloutou
              Feb 14 '17 at 1:02






            • 1




              it is a little tangential to the question but the most upvoted answer installs a version of python without pip and getting pip to work with that answer is actually really annoying. I think this answer is useful.
              – Charlie Parker
              Feb 14 '17 at 16:06














            up vote
            -1
            down vote













            On Ubuntu 16.04.1 LTS you have both python 2 (python), and python3 already installed.



            To update theme to the latest version, you can proceed as follows:


            1- Update the package list and upgrade all your system software to the latest version available



            sudo apt update && sudo apt -y upgrade



            2- install python-pip and python3-pip (alternative Python package installer) from Ubuntu repositories



            sudo apt install python-pip
            sudo apt install python3-pip


            2'- check the vesrions



            pip -V; pip3 -V



            3- upgrade pip (The PyPA recommended tool for installing Python packages) to the last version in PyPI (the Python Package Index)



            sudo -H pip3 install --upgrade pip 
            sudo -H pip install --upgrade pip


            3'- check the vesrions



            pip -V; pip3 -V


            you should get an output similar to:



            pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
            pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)



            4- (optionally) To be able to use a python subversion per project/application, and keep the dependencies required by different projects separated. you need to install Virtualenv



            [sudo -H] pip install virtualenv





            share|improve this answer






















            • How does this answer the question?
              – edwinksl
              Feb 14 '17 at 0:02










            • the question asks for installing "the latest Python releases" using A package manager (as opposed building from source). this is answered here. this answer also address "what issues might it create when upgrading to the next version?" and how to avoid them in 4 . btw, this is an update. the old question is already answered 2 years ago.
              – yaitloutou
              Feb 14 '17 at 0:18










            • The question is about installing the Python interpreter itself, not about pip or Python packages that can be installed using pip.
              – edwinksl
              Feb 14 '17 at 0:43










            • the Python interpreter is already installed, what still needed is to upgrade it. and this is what I've explained here. If you find the information in my answer incorrect or outdated, please let me know. and if you think that this doesn't answer the current question, as you understand it, feel free to share your knowledge, by posting another answer
              – yaitloutou
              Feb 14 '17 at 1:02






            • 1




              it is a little tangential to the question but the most upvoted answer installs a version of python without pip and getting pip to work with that answer is actually really annoying. I think this answer is useful.
              – Charlie Parker
              Feb 14 '17 at 16:06












            up vote
            -1
            down vote










            up vote
            -1
            down vote









            On Ubuntu 16.04.1 LTS you have both python 2 (python), and python3 already installed.



            To update theme to the latest version, you can proceed as follows:


            1- Update the package list and upgrade all your system software to the latest version available



            sudo apt update && sudo apt -y upgrade



            2- install python-pip and python3-pip (alternative Python package installer) from Ubuntu repositories



            sudo apt install python-pip
            sudo apt install python3-pip


            2'- check the vesrions



            pip -V; pip3 -V



            3- upgrade pip (The PyPA recommended tool for installing Python packages) to the last version in PyPI (the Python Package Index)



            sudo -H pip3 install --upgrade pip 
            sudo -H pip install --upgrade pip


            3'- check the vesrions



            pip -V; pip3 -V


            you should get an output similar to:



            pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
            pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)



            4- (optionally) To be able to use a python subversion per project/application, and keep the dependencies required by different projects separated. you need to install Virtualenv



            [sudo -H] pip install virtualenv





            share|improve this answer














            On Ubuntu 16.04.1 LTS you have both python 2 (python), and python3 already installed.



            To update theme to the latest version, you can proceed as follows:


            1- Update the package list and upgrade all your system software to the latest version available



            sudo apt update && sudo apt -y upgrade



            2- install python-pip and python3-pip (alternative Python package installer) from Ubuntu repositories



            sudo apt install python-pip
            sudo apt install python3-pip


            2'- check the vesrions



            pip -V; pip3 -V



            3- upgrade pip (The PyPA recommended tool for installing Python packages) to the last version in PyPI (the Python Package Index)



            sudo -H pip3 install --upgrade pip 
            sudo -H pip install --upgrade pip


            3'- check the vesrions



            pip -V; pip3 -V


            you should get an output similar to:



            pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
            pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)



            4- (optionally) To be able to use a python subversion per project/application, and keep the dependencies required by different projects separated. you need to install Virtualenv



            [sudo -H] pip install virtualenv






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Feb 14 '17 at 0:00

























            answered Feb 12 '17 at 22:04









            yaitloutou

            1334




            1334











            • How does this answer the question?
              – edwinksl
              Feb 14 '17 at 0:02










            • the question asks for installing "the latest Python releases" using A package manager (as opposed building from source). this is answered here. this answer also address "what issues might it create when upgrading to the next version?" and how to avoid them in 4 . btw, this is an update. the old question is already answered 2 years ago.
              – yaitloutou
              Feb 14 '17 at 0:18










            • The question is about installing the Python interpreter itself, not about pip or Python packages that can be installed using pip.
              – edwinksl
              Feb 14 '17 at 0:43










            • the Python interpreter is already installed, what still needed is to upgrade it. and this is what I've explained here. If you find the information in my answer incorrect or outdated, please let me know. and if you think that this doesn't answer the current question, as you understand it, feel free to share your knowledge, by posting another answer
              – yaitloutou
              Feb 14 '17 at 1:02






            • 1




              it is a little tangential to the question but the most upvoted answer installs a version of python without pip and getting pip to work with that answer is actually really annoying. I think this answer is useful.
              – Charlie Parker
              Feb 14 '17 at 16:06
















            • How does this answer the question?
              – edwinksl
              Feb 14 '17 at 0:02










            • the question asks for installing "the latest Python releases" using A package manager (as opposed building from source). this is answered here. this answer also address "what issues might it create when upgrading to the next version?" and how to avoid them in 4 . btw, this is an update. the old question is already answered 2 years ago.
              – yaitloutou
              Feb 14 '17 at 0:18










            • The question is about installing the Python interpreter itself, not about pip or Python packages that can be installed using pip.
              – edwinksl
              Feb 14 '17 at 0:43










            • the Python interpreter is already installed, what still needed is to upgrade it. and this is what I've explained here. If you find the information in my answer incorrect or outdated, please let me know. and if you think that this doesn't answer the current question, as you understand it, feel free to share your knowledge, by posting another answer
              – yaitloutou
              Feb 14 '17 at 1:02






            • 1




              it is a little tangential to the question but the most upvoted answer installs a version of python without pip and getting pip to work with that answer is actually really annoying. I think this answer is useful.
              – Charlie Parker
              Feb 14 '17 at 16:06















            How does this answer the question?
            – edwinksl
            Feb 14 '17 at 0:02




            How does this answer the question?
            – edwinksl
            Feb 14 '17 at 0:02












            the question asks for installing "the latest Python releases" using A package manager (as opposed building from source). this is answered here. this answer also address "what issues might it create when upgrading to the next version?" and how to avoid them in 4 . btw, this is an update. the old question is already answered 2 years ago.
            – yaitloutou
            Feb 14 '17 at 0:18




            the question asks for installing "the latest Python releases" using A package manager (as opposed building from source). this is answered here. this answer also address "what issues might it create when upgrading to the next version?" and how to avoid them in 4 . btw, this is an update. the old question is already answered 2 years ago.
            – yaitloutou
            Feb 14 '17 at 0:18












            The question is about installing the Python interpreter itself, not about pip or Python packages that can be installed using pip.
            – edwinksl
            Feb 14 '17 at 0:43




            The question is about installing the Python interpreter itself, not about pip or Python packages that can be installed using pip.
            – edwinksl
            Feb 14 '17 at 0:43












            the Python interpreter is already installed, what still needed is to upgrade it. and this is what I've explained here. If you find the information in my answer incorrect or outdated, please let me know. and if you think that this doesn't answer the current question, as you understand it, feel free to share your knowledge, by posting another answer
            – yaitloutou
            Feb 14 '17 at 1:02




            the Python interpreter is already installed, what still needed is to upgrade it. and this is what I've explained here. If you find the information in my answer incorrect or outdated, please let me know. and if you think that this doesn't answer the current question, as you understand it, feel free to share your knowledge, by posting another answer
            – yaitloutou
            Feb 14 '17 at 1:02




            1




            1




            it is a little tangential to the question but the most upvoted answer installs a version of python without pip and getting pip to work with that answer is actually really annoying. I think this answer is useful.
            – Charlie Parker
            Feb 14 '17 at 16:06




            it is a little tangential to the question but the most upvoted answer installs a version of python without pip and getting pip to work with that answer is actually really annoying. I think this answer is useful.
            – Charlie Parker
            Feb 14 '17 at 16:06












             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f682869%2fhow-do-i-install-a-different-python-version-using-apt-get%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491