4

I'm using Python for my research. I have both version of Python on my system: 3.3.2 and 2.7.6. However due to the compatibility with the required packages (openCV, Numpy, Scipy, etc.) and the legacy code, I work most of the time with Python 2.7.6.

It took me quite a lot of effort at the beginning to set up the environment ready for my works. E.g. I didn't follow the "easy" way of installing all-in-one Anaconda or Enthought Canopy software, instead I installed packages one by one (using pip..), some packages,(scipy, sympy, pandas, lxml) could not be installed by pip and I had to installed using a MSI file.

Now all of them are working fine. I see that Python released the newer version: 2.7.9. My questions are: (1) is it worth upgrading from 2.7.6 to 2.7.9, any benefit in performance, security, stability,...?

(2) will it break/overwrite the current setup of my 2.7.6 environment? I notice there are 2 folders on my C:\, which are Python27 and Python33. As the logic, Python 2.7.9 will also be in the same folder Python27 (as 2.7.6). Do I need to re-install/reconfigure the packages again?

(If there will be a lot of hassles, then perhaps I'll follow the mantra: "if it is not broken, don't fix it"...)


EDIT: Thanks for the comments, but as my understanding, this site is about Q&A: got question & get answered.

It's a simple and direct question, let me make it clearer: e.g. Python has Lib/site-packages folder with my packages inside. Will the new installation overwrite that folder, etc.

People may know or not know about this fact, based on their knowledge or experience. I don't want to experiment myself so I asked, just for my curiosity.

I know there's a trend to reform SO to get better question and answer quality, but I don't know since when the people can be so ridiculously sensitive :) If this one is asked in "Stack Exchange Programming" site, then I can understand that it's not well-suited for that site. Now I understand another effect of the trolls: they make a community become over-sensitive and drive the new/naive newbie away.

5
  • If you're just using it for research, I wouldn't bother. It's splitting hairs. Commented Dec 19, 2014 at 15:36
  • This type of question will likely accumulate down votes, since it is not well suited for stackoverflow. But some remarks from my side: Use the easy way of installing as you called it. These distributors make it extremely easy to update your python version and offer precompiled scientific packages. They are free and I don't see any downsides. Python is pretty stable, and I would not expect any tremendous performance improvements. Commented Dec 19, 2014 at 15:40
  • Oh too bad. Then perhaps it's better for me to stop asking question here. I know there's a trend to reform SO, but I don't know since when the people can be so harsh and sensitive. It's a simple and direct question, let me make it clearer: e.g. Python has Lib folder, with site-packages with my packages inside. Will the new installation overwrite that folder, etc. People may know or not know about this fact based on their experience. I don't want to experiment myself so I asked. Commented Dec 19, 2014 at 15:52
  • The problem is not that your question is not about programming. The problem is that you are asking many questions in one single question thread. Also some parts of your question are hard to answer. I agree with @mattm. If security is not so important, I would suggest staying with your current version. Becoming familiar with anaconda or another distributor may be a good idea. They make updating your python version and non-pythonic dependencies much easier. Commented Dec 19, 2014 at 16:44
  • FYI there are issues with 2.7.6 when you install jupyter. It requires 2.7.9+ versions of Python. Commented Jun 10, 2018 at 9:54

2 Answers 2

9

You can install the package that already exists in Debian jessie. I recommend doing an apt-get update and apt-get upgrade before starting.

Create /etc/apt/sources.list.d/python-jessie.list and add

deb http://httpredir.debian.org/debian jessie main deb-src http://httpredir.debian.org/debian jessie main deb http://httpredir.debian.org/debian jessie-updates main deb-src http://httpredir.debian.org/debian jessie-updates main deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main 

Add the apt keys for these new repositories

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9D6D8F6BC857C906 

We also need an apt-get preferences file which prevents Debian jessie packages with higher versions from taking over.

Create /etc/apt/preferences.d/python-jessie-pin and add

Package: * Pin: release o=Debian Pin-Priority: -10 

Now you can upgrade python 2.7.9

sudo apt-get update sudo apt-get install -t jessie python2.7 python --version 
Sign up to request clarification or add additional context in comments.

Comments

1

Upgrading to new version can give you more stable and featured version. Usually this is the case - version 2.7 is mature and stable. I think you do not need to re-install/reconfigure the packages again because of this stability (2.7.6 and 2.7.9 are 2.7 anyway). Problems are hardly possible, although they may be in very small number of cases. And folder with the subversion X.X will be overwrited, because there are no any folders for minor versions X.X.X

Unfortunately, I can not give more precise answer.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.