How can I upgrade Python to 2.7.9 on Ubuntu 14.4?Install python-psycopg on Ubuntu 9.10How do I upgrade django on ubuntu 9.04?How can I install Python in IIS 7.5Want to upgrade python for djangoPython on CentOS 5.xRecompiling python with SSL support on ubuntuWhy does httpd seem to use a different version of python with the same executable?How can I upgrade apache in Ubuntu 14.04 LTSpip installed under old version of pythonHow to upgrade Python 2.7.x version to the newest version 2.7.14?

Why does Kathryn say this in 12 Monkeys?

Deformation of rectangular plot

Traffic law UK, pedestrians

After the loss of Challenger, why weren’t Galileo and Ulysses launched by Centaurs on expendable boosters?

How would a aircraft visually signal in distress?

Last survivors from different time periods living together

How Can I Tell The Difference Between Unmarked Sugar and Stevia?

What are the peak hours for public transportation in Paris?

Does an ice chest packed full of frozen food need ice?

2.8 is missing the Carve option in the Boolean Modifier

How to generate random points without duplication?

Why don’t airliners have temporary liveries?

Building a road to escape Earth's gravity by making a pyramid on Antartica

What risks are there when you clear your cookies instead of logging off?

How to make a setting relevant?

What is the purpose of building foundations?

Payment instructions from HomeAway look fishy to me

What are the words for people who cause trouble believing they know better?

Turing patterns

How do I write "Show, Don't Tell" as a person with Asperger Syndrome?

How many times can you cast a card exiled by Release to the Wind?

Select items in a list that contain criteria #2

Do you need type ratings for private flying?

Why doesn’t a normal window produce an apparent rainbow?



How can I upgrade Python to 2.7.9 on Ubuntu 14.4?


Install python-psycopg on Ubuntu 9.10How do I upgrade django on ubuntu 9.04?How can I install Python in IIS 7.5Want to upgrade python for djangoPython on CentOS 5.xRecompiling python with SSL support on ubuntuWhy does httpd seem to use a different version of python with the same executable?How can I upgrade apache in Ubuntu 14.04 LTSpip installed under old version of pythonHow to upgrade Python 2.7.x version to the newest version 2.7.14?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








32















Ubuntu 14.4 comes with Python 2.7.6 built-in, but I'd like to upgrade it to 2.7.9 (it has security features that I want).



Is that even possible? If so, how can this be achieved?










share|improve this question

















  • 1





    The upstream version of python 2.7 is always going to be 2.7.6. Check the distribution version number, and then check the changelog (packages.ubuntu.com/source/trusty/python2.7) to see if those security updates have been backported.

    – Roger Sherman
    Feb 19 '15 at 14:30

















32















Ubuntu 14.4 comes with Python 2.7.6 built-in, but I'd like to upgrade it to 2.7.9 (it has security features that I want).



Is that even possible? If so, how can this be achieved?










share|improve this question

















  • 1





    The upstream version of python 2.7 is always going to be 2.7.6. Check the distribution version number, and then check the changelog (packages.ubuntu.com/source/trusty/python2.7) to see if those security updates have been backported.

    – Roger Sherman
    Feb 19 '15 at 14:30













32












32








32


5






Ubuntu 14.4 comes with Python 2.7.6 built-in, but I'd like to upgrade it to 2.7.9 (it has security features that I want).



Is that even possible? If so, how can this be achieved?










share|improve this question














Ubuntu 14.4 comes with Python 2.7.6 built-in, but I'd like to upgrade it to 2.7.9 (it has security features that I want).



Is that even possible? If so, how can this be achieved?







python ubuntu-14.04






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 19 '15 at 13:09









moomimamoomima

282147




282147







  • 1





    The upstream version of python 2.7 is always going to be 2.7.6. Check the distribution version number, and then check the changelog (packages.ubuntu.com/source/trusty/python2.7) to see if those security updates have been backported.

    – Roger Sherman
    Feb 19 '15 at 14:30












  • 1





    The upstream version of python 2.7 is always going to be 2.7.6. Check the distribution version number, and then check the changelog (packages.ubuntu.com/source/trusty/python2.7) to see if those security updates have been backported.

    – Roger Sherman
    Feb 19 '15 at 14:30







1




1





The upstream version of python 2.7 is always going to be 2.7.6. Check the distribution version number, and then check the changelog (packages.ubuntu.com/source/trusty/python2.7) to see if those security updates have been backported.

– Roger Sherman
Feb 19 '15 at 14:30





The upstream version of python 2.7 is always going to be 2.7.6. Check the distribution version number, and then check the changelog (packages.ubuntu.com/source/trusty/python2.7) to see if those security updates have been backported.

– Roger Sherman
Feb 19 '15 at 14:30










6 Answers
6






active

oldest

votes


















16














You can use pyenv:



 git clone https://github.com/pyenv/pyenv.git ~/.pyenv
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv


Then add



 # for PyEnv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$HOME/.pyenv/bin:$PATH"
export PATH="$HOME/.pyenv/shims:$PATH"
eval "$(pyenv init -)"


to .bash_profile
then you can see the python version you want to install or update:



pyenv install --list


want python 2.7.10? you can try:



 pyenv virtualenv 2.7.10


Hope it can help you.






share|improve this answer

























  • For Ubuntu, that block works better in ~/.bashrc rather than ~/.bash_profile. Then do exec "$SHELL".

    – brendan
    Aug 18 '17 at 10:39


















31














ppa:fkrull/deadsnakes-python2.7 is the latest version of python2.7



sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
sudo apt-get update
sudo apt-get upgrade


It will upgrade python to 2.7.10






share|improve this answer


















  • 1





    tried in development machines (all 14.04 desktops), very good alternative.

    – Yonsy Solis
    Sep 28 '15 at 21:24











  • But I found it was not compatible with my app.

    – Like
    Oct 25 '15 at 15:46






  • 4





    Beware that relying on an unofficial package, and/or a PPA, especially for something as fundamental as Python in Ubuntu, bypasses important security processes & can lead to many problems. Some packages explicitly depend on the official packages or versions. Instead, you may well want to use a virtualenv with a more recent version of python for just the apps you need it for. See also Upgrade to Python 2.7.9 on Ubuntu 14.04 LTS, and make your own .deb package for deployment - Renoir Boulanger

    – nealmcb
    Jan 29 '16 at 18:30












  • Good. You are right. I gave up my approach several months ago.

    – Like
    Jan 30 '16 at 11:53







  • 3





    This will upgrade all your packages.

    – mpen
    May 14 '16 at 1:26


















7














I'm not a fan of previous answers suggesting installing from various PPAs. No disrespect intended, but I don't know the people who built them and I have no idea what might be in there. In any environment where someone has to answer to a security professional that practice would be frowned upon.



I just found that downloading 2.7.9 from source and installing it side-by-side was a good start. This awesome blog post covered the steps. (recreated here to conform to stack overflow guidelines)



wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar xfz Python-2.7.9.tgz
cd Python-2.7.9/
./configure --prefix /usr/local/lib/python2.7.9
make
make install


Test if the version works



/usr/local/lib/python2.7.9/bin/python -V
Python 2.7.9


Now that I have 2.7.9 installed I can call it directly or symlink to it from wherever I want. (or copy it into a virtualenv etc.)



And note that I got here from a situation where I was getting insecure platform warnings, and SNI Missing warnings. Which led me here. I imagine many people are finding this question through the same path.
And if that's why you're here this snippet may be of use to you too



pip install urllib3[secure]





share|improve this answer






























    2














    You can go to the python.org and download the .tar.gz file compile and install it.
    You will need the basic tools in order to compile the source code. I don't remember if the "build-essential" package will suffice but give it a try.






    share|improve this answer
































      2














      The version you want is already in Ubuntu, in Vivid (pre)release. If you are brave, you can mix releases and install Vivid's version of Python under Trusty. Below is a generic solution that works on some packages, I can't warranty it with Python. The chances are ~ 50/50 that it will succeed. If you however find a proper backports repository for 14.04 with your required package version, then it should be a better choice.



      1. You have '... trusty main' line in your /etc/apt/sources.list, copy it twice, changing 'trusty' to 'utopic' and 'vivid'.


      2. Run apt-get update and then apt-get -t vivid install python2.7. Review dependencies installed before proceeding. Abort upgrade when you suspect any damage to your system (deleted important packages, etc.).


      3. Remove or hash the two lines from /etc/apt/sources.list.


      Never do it on production machines. Make a backup of your OS and prepare boot media to restore it if needed. Expect problems on upgrades. You've been warned.






      share|improve this answer
































        2














        Here is new upgraded third party repository:



        sudo add-apt-repository ppa:jonathonf/python-2.7
        sudo apt-get update
        sudo apt-get install python2.7
        python --version





        share|improve this answer























          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "2"
          ;
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f669859%2fhow-can-i-upgrade-python-to-2-7-9-on-ubuntu-14-4%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          6 Answers
          6






          active

          oldest

          votes








          6 Answers
          6






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          16














          You can use pyenv:



           git clone https://github.com/pyenv/pyenv.git ~/.pyenv
          git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv


          Then add



           # for PyEnv
          export PYENV_ROOT="$HOME/.pyenv"
          export PATH="$HOME/.pyenv/bin:$PATH"
          export PATH="$HOME/.pyenv/shims:$PATH"
          eval "$(pyenv init -)"


          to .bash_profile
          then you can see the python version you want to install or update:



          pyenv install --list


          want python 2.7.10? you can try:



           pyenv virtualenv 2.7.10


          Hope it can help you.






          share|improve this answer

























          • For Ubuntu, that block works better in ~/.bashrc rather than ~/.bash_profile. Then do exec "$SHELL".

            – brendan
            Aug 18 '17 at 10:39















          16














          You can use pyenv:



           git clone https://github.com/pyenv/pyenv.git ~/.pyenv
          git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv


          Then add



           # for PyEnv
          export PYENV_ROOT="$HOME/.pyenv"
          export PATH="$HOME/.pyenv/bin:$PATH"
          export PATH="$HOME/.pyenv/shims:$PATH"
          eval "$(pyenv init -)"


          to .bash_profile
          then you can see the python version you want to install or update:



          pyenv install --list


          want python 2.7.10? you can try:



           pyenv virtualenv 2.7.10


          Hope it can help you.






          share|improve this answer

























          • For Ubuntu, that block works better in ~/.bashrc rather than ~/.bash_profile. Then do exec "$SHELL".

            – brendan
            Aug 18 '17 at 10:39













          16












          16








          16







          You can use pyenv:



           git clone https://github.com/pyenv/pyenv.git ~/.pyenv
          git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv


          Then add



           # for PyEnv
          export PYENV_ROOT="$HOME/.pyenv"
          export PATH="$HOME/.pyenv/bin:$PATH"
          export PATH="$HOME/.pyenv/shims:$PATH"
          eval "$(pyenv init -)"


          to .bash_profile
          then you can see the python version you want to install or update:



          pyenv install --list


          want python 2.7.10? you can try:



           pyenv virtualenv 2.7.10


          Hope it can help you.






          share|improve this answer















          You can use pyenv:



           git clone https://github.com/pyenv/pyenv.git ~/.pyenv
          git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv


          Then add



           # for PyEnv
          export PYENV_ROOT="$HOME/.pyenv"
          export PATH="$HOME/.pyenv/bin:$PATH"
          export PATH="$HOME/.pyenv/shims:$PATH"
          eval "$(pyenv init -)"


          to .bash_profile
          then you can see the python version you want to install or update:



          pyenv install --list


          want python 2.7.10? you can try:



           pyenv virtualenv 2.7.10


          Hope it can help you.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 20 at 18:26









          Emii Khaos

          485415




          485415










          answered Oct 30 '15 at 14:07









          Jeremy AnifaccJeremy Anifacc

          27622




          27622












          • For Ubuntu, that block works better in ~/.bashrc rather than ~/.bash_profile. Then do exec "$SHELL".

            – brendan
            Aug 18 '17 at 10:39

















          • For Ubuntu, that block works better in ~/.bashrc rather than ~/.bash_profile. Then do exec "$SHELL".

            – brendan
            Aug 18 '17 at 10:39
















          For Ubuntu, that block works better in ~/.bashrc rather than ~/.bash_profile. Then do exec "$SHELL".

          – brendan
          Aug 18 '17 at 10:39





          For Ubuntu, that block works better in ~/.bashrc rather than ~/.bash_profile. Then do exec "$SHELL".

          – brendan
          Aug 18 '17 at 10:39













          31














          ppa:fkrull/deadsnakes-python2.7 is the latest version of python2.7



          sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
          sudo apt-get update
          sudo apt-get upgrade


          It will upgrade python to 2.7.10






          share|improve this answer


















          • 1





            tried in development machines (all 14.04 desktops), very good alternative.

            – Yonsy Solis
            Sep 28 '15 at 21:24











          • But I found it was not compatible with my app.

            – Like
            Oct 25 '15 at 15:46






          • 4





            Beware that relying on an unofficial package, and/or a PPA, especially for something as fundamental as Python in Ubuntu, bypasses important security processes & can lead to many problems. Some packages explicitly depend on the official packages or versions. Instead, you may well want to use a virtualenv with a more recent version of python for just the apps you need it for. See also Upgrade to Python 2.7.9 on Ubuntu 14.04 LTS, and make your own .deb package for deployment - Renoir Boulanger

            – nealmcb
            Jan 29 '16 at 18:30












          • Good. You are right. I gave up my approach several months ago.

            – Like
            Jan 30 '16 at 11:53







          • 3





            This will upgrade all your packages.

            – mpen
            May 14 '16 at 1:26















          31














          ppa:fkrull/deadsnakes-python2.7 is the latest version of python2.7



          sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
          sudo apt-get update
          sudo apt-get upgrade


          It will upgrade python to 2.7.10






          share|improve this answer


















          • 1





            tried in development machines (all 14.04 desktops), very good alternative.

            – Yonsy Solis
            Sep 28 '15 at 21:24











          • But I found it was not compatible with my app.

            – Like
            Oct 25 '15 at 15:46






          • 4





            Beware that relying on an unofficial package, and/or a PPA, especially for something as fundamental as Python in Ubuntu, bypasses important security processes & can lead to many problems. Some packages explicitly depend on the official packages or versions. Instead, you may well want to use a virtualenv with a more recent version of python for just the apps you need it for. See also Upgrade to Python 2.7.9 on Ubuntu 14.04 LTS, and make your own .deb package for deployment - Renoir Boulanger

            – nealmcb
            Jan 29 '16 at 18:30












          • Good. You are right. I gave up my approach several months ago.

            – Like
            Jan 30 '16 at 11:53







          • 3





            This will upgrade all your packages.

            – mpen
            May 14 '16 at 1:26













          31












          31








          31







          ppa:fkrull/deadsnakes-python2.7 is the latest version of python2.7



          sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
          sudo apt-get update
          sudo apt-get upgrade


          It will upgrade python to 2.7.10






          share|improve this answer













          ppa:fkrull/deadsnakes-python2.7 is the latest version of python2.7



          sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
          sudo apt-get update
          sudo apt-get upgrade


          It will upgrade python to 2.7.10







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 27 '15 at 5:53









          LikeLike

          419144




          419144







          • 1





            tried in development machines (all 14.04 desktops), very good alternative.

            – Yonsy Solis
            Sep 28 '15 at 21:24











          • But I found it was not compatible with my app.

            – Like
            Oct 25 '15 at 15:46






          • 4





            Beware that relying on an unofficial package, and/or a PPA, especially for something as fundamental as Python in Ubuntu, bypasses important security processes & can lead to many problems. Some packages explicitly depend on the official packages or versions. Instead, you may well want to use a virtualenv with a more recent version of python for just the apps you need it for. See also Upgrade to Python 2.7.9 on Ubuntu 14.04 LTS, and make your own .deb package for deployment - Renoir Boulanger

            – nealmcb
            Jan 29 '16 at 18:30












          • Good. You are right. I gave up my approach several months ago.

            – Like
            Jan 30 '16 at 11:53







          • 3





            This will upgrade all your packages.

            – mpen
            May 14 '16 at 1:26












          • 1





            tried in development machines (all 14.04 desktops), very good alternative.

            – Yonsy Solis
            Sep 28 '15 at 21:24











          • But I found it was not compatible with my app.

            – Like
            Oct 25 '15 at 15:46






          • 4





            Beware that relying on an unofficial package, and/or a PPA, especially for something as fundamental as Python in Ubuntu, bypasses important security processes & can lead to many problems. Some packages explicitly depend on the official packages or versions. Instead, you may well want to use a virtualenv with a more recent version of python for just the apps you need it for. See also Upgrade to Python 2.7.9 on Ubuntu 14.04 LTS, and make your own .deb package for deployment - Renoir Boulanger

            – nealmcb
            Jan 29 '16 at 18:30












          • Good. You are right. I gave up my approach several months ago.

            – Like
            Jan 30 '16 at 11:53







          • 3





            This will upgrade all your packages.

            – mpen
            May 14 '16 at 1:26







          1




          1





          tried in development machines (all 14.04 desktops), very good alternative.

          – Yonsy Solis
          Sep 28 '15 at 21:24





          tried in development machines (all 14.04 desktops), very good alternative.

          – Yonsy Solis
          Sep 28 '15 at 21:24













          But I found it was not compatible with my app.

          – Like
          Oct 25 '15 at 15:46





          But I found it was not compatible with my app.

          – Like
          Oct 25 '15 at 15:46




          4




          4





          Beware that relying on an unofficial package, and/or a PPA, especially for something as fundamental as Python in Ubuntu, bypasses important security processes & can lead to many problems. Some packages explicitly depend on the official packages or versions. Instead, you may well want to use a virtualenv with a more recent version of python for just the apps you need it for. See also Upgrade to Python 2.7.9 on Ubuntu 14.04 LTS, and make your own .deb package for deployment - Renoir Boulanger

          – nealmcb
          Jan 29 '16 at 18:30






          Beware that relying on an unofficial package, and/or a PPA, especially for something as fundamental as Python in Ubuntu, bypasses important security processes & can lead to many problems. Some packages explicitly depend on the official packages or versions. Instead, you may well want to use a virtualenv with a more recent version of python for just the apps you need it for. See also Upgrade to Python 2.7.9 on Ubuntu 14.04 LTS, and make your own .deb package for deployment - Renoir Boulanger

          – nealmcb
          Jan 29 '16 at 18:30














          Good. You are right. I gave up my approach several months ago.

          – Like
          Jan 30 '16 at 11:53






          Good. You are right. I gave up my approach several months ago.

          – Like
          Jan 30 '16 at 11:53





          3




          3





          This will upgrade all your packages.

          – mpen
          May 14 '16 at 1:26





          This will upgrade all your packages.

          – mpen
          May 14 '16 at 1:26











          7














          I'm not a fan of previous answers suggesting installing from various PPAs. No disrespect intended, but I don't know the people who built them and I have no idea what might be in there. In any environment where someone has to answer to a security professional that practice would be frowned upon.



          I just found that downloading 2.7.9 from source and installing it side-by-side was a good start. This awesome blog post covered the steps. (recreated here to conform to stack overflow guidelines)



          wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
          tar xfz Python-2.7.9.tgz
          cd Python-2.7.9/
          ./configure --prefix /usr/local/lib/python2.7.9
          make
          make install


          Test if the version works



          /usr/local/lib/python2.7.9/bin/python -V
          Python 2.7.9


          Now that I have 2.7.9 installed I can call it directly or symlink to it from wherever I want. (or copy it into a virtualenv etc.)



          And note that I got here from a situation where I was getting insecure platform warnings, and SNI Missing warnings. Which led me here. I imagine many people are finding this question through the same path.
          And if that's why you're here this snippet may be of use to you too



          pip install urllib3[secure]





          share|improve this answer



























            7














            I'm not a fan of previous answers suggesting installing from various PPAs. No disrespect intended, but I don't know the people who built them and I have no idea what might be in there. In any environment where someone has to answer to a security professional that practice would be frowned upon.



            I just found that downloading 2.7.9 from source and installing it side-by-side was a good start. This awesome blog post covered the steps. (recreated here to conform to stack overflow guidelines)



            wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
            tar xfz Python-2.7.9.tgz
            cd Python-2.7.9/
            ./configure --prefix /usr/local/lib/python2.7.9
            make
            make install


            Test if the version works



            /usr/local/lib/python2.7.9/bin/python -V
            Python 2.7.9


            Now that I have 2.7.9 installed I can call it directly or symlink to it from wherever I want. (or copy it into a virtualenv etc.)



            And note that I got here from a situation where I was getting insecure platform warnings, and SNI Missing warnings. Which led me here. I imagine many people are finding this question through the same path.
            And if that's why you're here this snippet may be of use to you too



            pip install urllib3[secure]





            share|improve this answer

























              7












              7








              7







              I'm not a fan of previous answers suggesting installing from various PPAs. No disrespect intended, but I don't know the people who built them and I have no idea what might be in there. In any environment where someone has to answer to a security professional that practice would be frowned upon.



              I just found that downloading 2.7.9 from source and installing it side-by-side was a good start. This awesome blog post covered the steps. (recreated here to conform to stack overflow guidelines)



              wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
              tar xfz Python-2.7.9.tgz
              cd Python-2.7.9/
              ./configure --prefix /usr/local/lib/python2.7.9
              make
              make install


              Test if the version works



              /usr/local/lib/python2.7.9/bin/python -V
              Python 2.7.9


              Now that I have 2.7.9 installed I can call it directly or symlink to it from wherever I want. (or copy it into a virtualenv etc.)



              And note that I got here from a situation where I was getting insecure platform warnings, and SNI Missing warnings. Which led me here. I imagine many people are finding this question through the same path.
              And if that's why you're here this snippet may be of use to you too



              pip install urllib3[secure]





              share|improve this answer













              I'm not a fan of previous answers suggesting installing from various PPAs. No disrespect intended, but I don't know the people who built them and I have no idea what might be in there. In any environment where someone has to answer to a security professional that practice would be frowned upon.



              I just found that downloading 2.7.9 from source and installing it side-by-side was a good start. This awesome blog post covered the steps. (recreated here to conform to stack overflow guidelines)



              wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
              tar xfz Python-2.7.9.tgz
              cd Python-2.7.9/
              ./configure --prefix /usr/local/lib/python2.7.9
              make
              make install


              Test if the version works



              /usr/local/lib/python2.7.9/bin/python -V
              Python 2.7.9


              Now that I have 2.7.9 installed I can call it directly or symlink to it from wherever I want. (or copy it into a virtualenv etc.)



              And note that I got here from a situation where I was getting insecure platform warnings, and SNI Missing warnings. Which led me here. I imagine many people are finding this question through the same path.
              And if that's why you're here this snippet may be of use to you too



              pip install urllib3[secure]






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Mar 28 '18 at 21:47









              jorfusjorfus

              440311




              440311





















                  2














                  You can go to the python.org and download the .tar.gz file compile and install it.
                  You will need the basic tools in order to compile the source code. I don't remember if the "build-essential" package will suffice but give it a try.






                  share|improve this answer





























                    2














                    You can go to the python.org and download the .tar.gz file compile and install it.
                    You will need the basic tools in order to compile the source code. I don't remember if the "build-essential" package will suffice but give it a try.






                    share|improve this answer



























                      2












                      2








                      2







                      You can go to the python.org and download the .tar.gz file compile and install it.
                      You will need the basic tools in order to compile the source code. I don't remember if the "build-essential" package will suffice but give it a try.






                      share|improve this answer















                      You can go to the python.org and download the .tar.gz file compile and install it.
                      You will need the basic tools in order to compile the source code. I don't remember if the "build-essential" package will suffice but give it a try.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Feb 19 '15 at 13:31









                      Dave M

                      4,38992428




                      4,38992428










                      answered Feb 19 '15 at 13:22









                      jaumzorsjaumzors

                      212




                      212





















                          2














                          The version you want is already in Ubuntu, in Vivid (pre)release. If you are brave, you can mix releases and install Vivid's version of Python under Trusty. Below is a generic solution that works on some packages, I can't warranty it with Python. The chances are ~ 50/50 that it will succeed. If you however find a proper backports repository for 14.04 with your required package version, then it should be a better choice.



                          1. You have '... trusty main' line in your /etc/apt/sources.list, copy it twice, changing 'trusty' to 'utopic' and 'vivid'.


                          2. Run apt-get update and then apt-get -t vivid install python2.7. Review dependencies installed before proceeding. Abort upgrade when you suspect any damage to your system (deleted important packages, etc.).


                          3. Remove or hash the two lines from /etc/apt/sources.list.


                          Never do it on production machines. Make a backup of your OS and prepare boot media to restore it if needed. Expect problems on upgrades. You've been warned.






                          share|improve this answer





























                            2














                            The version you want is already in Ubuntu, in Vivid (pre)release. If you are brave, you can mix releases and install Vivid's version of Python under Trusty. Below is a generic solution that works on some packages, I can't warranty it with Python. The chances are ~ 50/50 that it will succeed. If you however find a proper backports repository for 14.04 with your required package version, then it should be a better choice.



                            1. You have '... trusty main' line in your /etc/apt/sources.list, copy it twice, changing 'trusty' to 'utopic' and 'vivid'.


                            2. Run apt-get update and then apt-get -t vivid install python2.7. Review dependencies installed before proceeding. Abort upgrade when you suspect any damage to your system (deleted important packages, etc.).


                            3. Remove or hash the two lines from /etc/apt/sources.list.


                            Never do it on production machines. Make a backup of your OS and prepare boot media to restore it if needed. Expect problems on upgrades. You've been warned.






                            share|improve this answer



























                              2












                              2








                              2







                              The version you want is already in Ubuntu, in Vivid (pre)release. If you are brave, you can mix releases and install Vivid's version of Python under Trusty. Below is a generic solution that works on some packages, I can't warranty it with Python. The chances are ~ 50/50 that it will succeed. If you however find a proper backports repository for 14.04 with your required package version, then it should be a better choice.



                              1. You have '... trusty main' line in your /etc/apt/sources.list, copy it twice, changing 'trusty' to 'utopic' and 'vivid'.


                              2. Run apt-get update and then apt-get -t vivid install python2.7. Review dependencies installed before proceeding. Abort upgrade when you suspect any damage to your system (deleted important packages, etc.).


                              3. Remove or hash the two lines from /etc/apt/sources.list.


                              Never do it on production machines. Make a backup of your OS and prepare boot media to restore it if needed. Expect problems on upgrades. You've been warned.






                              share|improve this answer















                              The version you want is already in Ubuntu, in Vivid (pre)release. If you are brave, you can mix releases and install Vivid's version of Python under Trusty. Below is a generic solution that works on some packages, I can't warranty it with Python. The chances are ~ 50/50 that it will succeed. If you however find a proper backports repository for 14.04 with your required package version, then it should be a better choice.



                              1. You have '... trusty main' line in your /etc/apt/sources.list, copy it twice, changing 'trusty' to 'utopic' and 'vivid'.


                              2. Run apt-get update and then apt-get -t vivid install python2.7. Review dependencies installed before proceeding. Abort upgrade when you suspect any damage to your system (deleted important packages, etc.).


                              3. Remove or hash the two lines from /etc/apt/sources.list.


                              Never do it on production machines. Make a backup of your OS and prepare boot media to restore it if needed. Expect problems on upgrades. You've been warned.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Feb 19 '15 at 19:16

























                              answered Feb 19 '15 at 15:46









                              sam_pan_mariuszsam_pan_mariusz

                              1,6631614




                              1,6631614





















                                  2














                                  Here is new upgraded third party repository:



                                  sudo add-apt-repository ppa:jonathonf/python-2.7
                                  sudo apt-get update
                                  sudo apt-get install python2.7
                                  python --version





                                  share|improve this answer



























                                    2














                                    Here is new upgraded third party repository:



                                    sudo add-apt-repository ppa:jonathonf/python-2.7
                                    sudo apt-get update
                                    sudo apt-get install python2.7
                                    python --version





                                    share|improve this answer

























                                      2












                                      2








                                      2







                                      Here is new upgraded third party repository:



                                      sudo add-apt-repository ppa:jonathonf/python-2.7
                                      sudo apt-get update
                                      sudo apt-get install python2.7
                                      python --version





                                      share|improve this answer













                                      Here is new upgraded third party repository:



                                      sudo add-apt-repository ppa:jonathonf/python-2.7
                                      sudo apt-get update
                                      sudo apt-get install python2.7
                                      python --version






                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Oct 9 '17 at 19:42









                                      arbabnazararbabnazar

                                      25336




                                      25336



























                                          draft saved

                                          draft discarded
















































                                          Thanks for contributing an answer to Server Fault!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid


                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.

                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f669859%2fhow-can-i-upgrade-python-to-2-7-9-on-ubuntu-14-4%23new-answer', 'question_page');

                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

                                          Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

                                          What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company