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

                                          Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                                          Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                                          Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020