After using easy_install I find that I am still unable to upgrade the default Python version for my newly installed Ubuntu system. The main error, from what I can tell, is that I'm missing the 'pyconfig.h' directory. Why isn't this included with the source files from Python.org, or if it is, how can I find it to complete the upgrade? Am I missing steps or another package?
-
As far as I know easy_install won't help you install a new python version. After you have download the the source tar-file you will need to compile according to this: http://askubuntu.com/questions/25961/how-do-i-install-a-tar-gz-or-tar-bz2-file – MadMike Oct 21 '14 at 05:26
-
possible duplicate of Is it possible to install Python 3.x in 14.04 LTS? – muru Oct 22 '14 at 04:57
1 Answers
If you think easy_install has anything to do with upgrading the python interpreter itself, my answer is: don't do it. easy_install is a script that installs or upgrades additional python packages - not python itself ... and in almost all cases it is better to use pip for that for quite some years already.
The preinstalled python 2.x and 3.x are heavily used by the system itself and have exactly the version that the system needs. Upgrades of the python version are done by the system if necessary, as part of the normal system updates.
If you need a different python version for development it should be kept separate from the python used by the system. You usually use virtualenv for that. There is a good description how to do that in an virtualenv in a stackoverflow question
If you need a newer version of Python itself, than what the system offers I would recommend using pyenv for easy installation of additional Python versions in userspace.

- 146
- 4