I have always been a windows user but a few months ago switch to Ubuntu Linux. I have started learning Python and want to find out from experienced developers what the best way is to setup a development environment on a Ubuntu machine.

I am running Ubuntu 12.04 which comes with Python 2.7 by default. I prefer to use Eclipse with PyDev plugin but get really confused when it comes to all the other setup options with Virtualenv PIP and Easy_Install.

Are there newbie friendly articles on how these techonologies should be used to setup a Python 3.1 environement on the same box? I can't find anything that advises on how to choose which of these technologies to use and how to setup the environment with them.

Any advice would be greatly appreciated.

Kind Regards,

You can download a new python version and run it separately in ubuntu by putting the new call into your path. Don't uninstall your system version, this will mess up the OS (yes python is integral to ubuntu). By default, your system's python exectuable is installed in /usr/bin/.

So let's say you install python 3.1 to a folder /usr/local/Python3.1/ for example...

Then you want to open up your bashrc file (in terminal sudo gedit ~/.bashrc).

You can then add the new python directory to your path like son:

export PATH

Save the file (but don't close it in case you made a typo). Open a new terminal to refresh the changes and then type python. Your new version should be accessed now. You can still keep a link to your old build if you want, and my preferred way to do this is to add an alias in the bashrc file. Like this:

alias python1='/usr/bin/python'

Now when you type "python1" in your terminal, your old version should work.

I am spoiled; I use the enthought python distribution so it's extremely easy for me to update packages; however, when you install from source, I think it should be straightforward to tell setup.py how to know which python you want to install to. That is something someone else can help with probably.

Hope this is helpful; trust me, I learned this the hard way.

Edited 4 Years Ago by hughesadam_87

Thank you very much. I will give it a go. Much appreciated!

This question has already been answered. Start a new discussion instead.