0

I am a new Linux user I just swapped over from Windows. Well rather I'm dual booting but plan to use Ubuntu as my primary OS from now on. I just installed Python 2.7.8 and in the thread that I read the instructions from the poster said that it was required that I install some dependencies. However, Python runs fine and I haven't installed anything else. I was wondering if this was just an older thing as the thread was installing Python 2.7.5 on an older version of Ubuntu (I am using 14.04 lts). I'll link the other thread below. If anyone can tell me why he installed the dependencies and if I need them that would be great. Thanks in advance for any help.

To clarify I was looking for anything that I needed to install before I could use Python 2.7.8 without issues, but this was before I learned that a version of Python shipped with Ubuntu. So I now have Python 2.7.8 and Python 3.4 (although my computer only shows Python 3.4 in the software center) as long as it is ok to have two different installs of different versions of Python without any drastic issues then I'm fine. I was just wondering if there was anything else that needed to be installed for them to work properly.

How do I install the latest Python 2.7.X or 3.X on Ubuntu?

8
  • 1
    Nothing in the question says anything about why the default version of python in Ubuntu (2.7.6, 3.4.0) won't work for you.
    – muru
    Sep 10, 2014 at 2:47
  • @muru the link provided in the question is for building python from source and so there are dependencies listed, build essential etc.
    – mchid
    Sep 10, 2014 at 3:16
  • @mchid My question is: Why is OP installing from source? Without that information, there's no answering the question.
    – muru
    Sep 10, 2014 at 3:18
  • @Boomer697 you don't need those dependencies unless you want to build python from source. If you've installed python though ubuntu software-center or apt-get, the dependencies are resolved for you automatically.
    – mchid
    Sep 10, 2014 at 3:18
  • @muru he installed python, then read the thread
    – mchid
    Sep 10, 2014 at 3:19

2 Answers 2

1

Python is installed by default with Ubuntu, so if you were "upgrading" from an older version to the most up to date (at the point in the linked question it appears to be 2.7.2) However currently 2.7.2 is not the most up to date version at this moment. Even for python 2.X, 2.7.8 was latest upgrade.

As a side note, depending on how much you are running python programs, you may wish to have both 2.X, and 3.X installed.(Where 'X' is whatever version number after dot) The reason for this is, the language has different semantics, and it is sometimes just easier to have both, versus editing code.


Other information:

From command line to run pre-3 python:

python filename.py

From command line to run python 3.X:

python3 filename.py

1
  • Thank you for you input, at the time of installing Python I hadn't known that Ubuntu came with it already. Thanks for the tips too.
    – Boomer697
    Sep 10, 2014 at 19:05
1

Ubuntu and apt in general have a very cool feature called "Dependency Resolution."

Meaning, it will automatically install all required dependencies for you at the time of install. If it cannot, it will usually complain and the program will not work.

In your case, it sounds like everything installed and dependency resolution did its job right.

FFR, apt will always let you know if something is wrong. If it doesn't say something is wrong, it worked.

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