[CentOS] upgrading python

Tue Dec 5 15:00:04 UTC 2017
Marc Gouw <marc.gouw at embl.de>

On 12/05/2017 02:45 PM, Kai Grunau wrote:
> On 05.12.2017 14:24, Larry Martell wrote:
>> On Tue, Dec 5, 2017 at 8:16 AM, Kai Grunau <kgrunau at geomar.de> wrote:
>>> On 05.12.2017 14:05, Larry Martell wrote:
>>>> I am running CentOS 7 and I have python version:
>>>> Python 2.7.5 (default, Sep 15 2016, 22:37:39)
>>>> I need a newer version of 2.7 to pick up a bug fix. How can I do that
>>>> (without breaking anything in CentOS)?
>>> you could use the anaconda software, it is independent of the OS
>>> regards
>> I am not familiar with that. This is for a django app, using nginx,
>> uWSGI, and mysql - will it integrate easily with those components?
> Anaconda is a python installation independent of the OS.
> You can install it without root rights. Only your environment
> has to change to use the new python version
> I think is easy to  work with those components

I've happily been using python virtual environments (similar to 
anaconda) alongside with Apache, WSGI & django for a long time. The 
setup using NGINX should be almost the same (with some small differences 
in setting up NGINX, of course).

I would suggest "virtualenv" instead of anaconda: The principle is the 
same, but it offers just a bit more flexibility and customization. 
Virtualenv creates a local (non-system) installation of python, and you 
can create different collections of packages stored as different 
environments. In this way you can have multiple versions of python + 
different collections of packages all living happily side by side on the 
same machine.

Regarding the setup with uWSGI + NGINX, the Django documentation "How to 
use Django with Apache and mod_wsgi"  is excellent: 

There is also a similar setup for NGINX on readthedocs (which I assume 
will also work): 

For the rest: Google is your friend, you'll find lots of information on 
each of these topics.

Good luck!


Marc Gouw
Software Engineer
Gibson Team
EMBL Heidelberg