2

I do not want to have two versions of Python on my computer and the version that I want is 2.7.

I (today) installed Ubuntu 16.04 so that I would have Python 2.7, but (possibly because 16.04 is older and my computer is newer) I am having issues with it recognizing my display. (I had originally installed 18.04, and it worked great -- except it had Python 3.0, which I do not want.) I have the option of "upgrading" to Ubuntu 18.04 (hopefully that would fix the display issues), but the whole reason that I went with 16.04 was to get Python 2.7.

There are posts about how to remove a version or modify code, but that is not my question. My question is simply this: If I say "yes" to the upgrade to 18.04 (because it is asking if I want to do this) am I going to have two versions of Python, or worse, will I lose 2.7 and get 3.0?

Thank you.

4
  • Welcome to Ask Ubuntu. What release or version of Ubuntu 16.04 LTS did you install? I'm really asking if you are using the HWE kernel (hardware enablement stack) won't be present if install was with 16.04; but will be if added or installed with 16.04.2 or later. HWE if enabled will mean you're running the 18.04 kernel resulting in most (if not all) hardware recognized by 18.04 LTS should also be seen by 16.04 LTS. This doesn't answer your question, but may solve your issue on 16.04 LTS wiki.ubuntu.com/Kernel/RollingLTSEnablementStack)
    – guiverc
    Jan 13, 2019 at 5:16
  • It was 16.04.5.
    – AMH
    Jan 13, 2019 at 6:28
  • Python 2.7 is still available to install through the repositories. I still maintain some Python 2 code and am running 18.04. What's the reason for not wanting to have both Python 2 and 3 installed? There should be absolutely no issue with this.
    – Timo
    Jan 13, 2019 at 9:11
  • I am not super computer savvy, and I am worried about running into issues where things get muddied by having two different versions of Python. It's literally taken me ALL day to get this far. I've installed/uninstalled/installed/uninstalled... (you get the point) because I can't undo something that I didn't mean to do. Thank you for your perspective.
    – AMH
    Jan 13, 2019 at 9:41

1 Answer 1

1

Ubuntu 18.04 comes with Python 2.7.15 and 3.6.5. By default only 3.6.5 is installed but if you upgrade from a system that already has Python2 installed or install a package that requires Python2 you'll get Python 2.7.15, too.

As there are a lot of programs using Python and official support for Python2 is going to end soon there's likely no way way to use a modern desktop Linux distro without having some version of Python3 installed.

3
  • I'm not installing it fresh, just upgrading to it. So, it sounds like the upgrade is going to install Python 3. Thank you for your help.
    – AMH
    Jan 13, 2019 at 9:42
  • Yep, it did :-( I am going to try to figure out how to get it back to 2.7. When I try to edit the configuration (I'm using PyCharm) it doesn't even give me 2.7 as an option. But it's wierd...if I type python --version in my terminal, it returns python 2.7.12.
    – AMH
    Jan 14, 2019 at 17:31
  • Got it figured out. I need to '+' a configuration that points to the 2.7. Thank you for the help. Now I have both 2.7 and 3.6, so when we finally switch to 3, I'll be all set.
    – AMH
    Jan 15, 2019 at 17:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .