This blog post describes and illustrates, where needed, how to install Aptana Studio with Python 2.7 on Ubuntu 12.04. It will guide you through the following:
- Installing the prerequisites
- Installing Aptana Studio
- Installing Python 2.7
- Optional >> Installing Git
Before beginning, ponder upon the might of Python as described by xckd:
Installing Prerequisites
If you have created an image, I highly recommend installing all updates before proceeding.
1. Open the Update Manager and install all available updates
1.1. If the application is not available on your Launcher (or sidebar, if you will), simply open Dash Home and search for it here
2. Open a terminal
3. Install additional updates (copy-paste):
$ sudo apt-get update
Having installed all of the available updates, our next step is to install Aptana Studio.
Installing Aptana Studio
I personally, in all essence, prefer Aptana Studio due to the high amount of customizability which the IDE provides. If you prefer, you can obviously install any other IDE of your choice, and proceed to installing Python. Alas, to install Aptana, follow the steps below:
1. Download Aptana from their website: http://aptana.com/products/studio3/download
2. Open a terminal
3. Navigate to Downloads (copy-paste):
$ cd ~/Downloads/
4. Unzip Aptana Studio to /opt/ (copy-paste):
$ sudo unzip Aptana_Studio_3_Setup_Linux_<architecture>_<version>.zip -d /opt/
Note that:
- <architecture> should be replaced with your system architecture (in my case, x86_64; i.e. 64-bit Ubuntu)
- <version> should be replaced with the version of Aptana which you’ve downloaded (in my case, 3.4.2)
Now that you’ve extracted Aptana, your IDE is ready for use and can either be accessed by the folder itself, or by the following command:
$ /opt/Aptana_Studio_<version>/AptanaStudio<version>
Note that:
- <version> should be replaced with the version of Aptana which you’ve downloaded (in my case, 3)
Install Python 2.7
Having installed our IDE, the next step is to install the Python 2.7 interpreter. Although, first some dependencies should be installed before install Python itself.
1. Open a terminal
2. Install the build essentials (copy-paste):
$ sudo apt-get install build-essential
3. Then, install the necessary libraries for installing Python (copy-paste):
$ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
4. Navigate to Downloads (copy-paste):
$ cd ~/Downloads/
5. Download Python 2.7 (copy-paste):
$ wget http://legacy.python.org/ftp//python/2.7/Python-2.7.tgz
Note that:
- If you wish to install another version of Python, simply navigate to the Python FTP site, find the version which suit your requirement, and thereafter copy the link of the tar.gz container and replace it with the one above.
6. Extract the archive (copy-paste):
$ tar -xvf Python-2.7.tgz
7. Navigate to the extracted Python Directory:
$ cd /Python-2.7
8. Lastly, we need to install Python which is a three step manouvre (copy-paste):
$ ./configure $ make $ sudo make install
The Python Interpreter has now been installed, which you can test by entering the following in your terminal:
$ python --version
Congratulations! You have now compiled and installed Python 2.7 on Ubuntu 12.04.
Installing Additional Modules
At some point in the near future, you will most likely need to install additional modules. To ensure that you can do so although only requires little effort:
1. Install pip: a module for installing python modules (copy-paste):
$ sudo apt-get install python-pip
Afterwards, whenever you wish to install a module, take for instance nltk, the basic use of pip is:
$ sudo pip install nltk
Optional >> Installing Git
If you wish to install Git, which is a popular choice for version control, the method is quite simple:
1. Open a terminal
2. Install Git (copy-paste):
$ sudo apt-get install git
By now, Git has been installed, but you will need to add a .ssh key for verification purposes. A very simple guide, provided by Github, will explain you exactly how to do just that. At some point, you will although need to copy the contents of the key to your Github account, where a problem might occur as seen in the screenshot below:
If you experience, this issue, simply follow the simple steps as provided in this guide:
1. Open a terminal
2. Copy the contents of the id_rsa.pub file by using gedit:
$ sudo gedit ~/.ssh/id_rsa.pub
3. Now simply head over to GitHub and add your SSH key as mentioned in the guide provided by GitHub
Now you can continue following the guide provided by Github, and test that everything works out accordingly.
Discussion
Initially, I tried installing Aptana Studio 3.4.2 on a virtual machine running Ubuntu 13.10, but found that the menu in Aptana was no longer available. Trying to debug and solve the issue for several hours, even though a common answer was given on several forums, I was never able to accomodate for the problem. This meant that I personally reverted to Ubuntu 12.04, which, by now, works just fine.
References
Installing Python: http://askubuntu.com/questions/101591/how-do-i-install-python-2-7-2-on-ubuntu
Generating a SSH key: https://help.github.com/articles/generating-ssh-keys
Copying file contents: http://jetpackweb.com/blog/2009/09/23/pbcopy-in-ubuntu-command-line-clipboard/