Python versions in Ubuntu

Ubuntu comes with both python versions 2.x and 3.x.
The default python version in ubuntu is 2.x

The python versions installed in ubuntu can be found using the below commands:
For both cases, to get out from Python shell, write:

 exit()

For installing python modules in python 2.x in ubuntu, use  :

pip

For installing python modules in python 3.x in ubuntu, use:

 pip3

Update setuptools in python

If package installation returns the following error:

python setup.py egg_info" failed with error code 1 in /tmp/xyz moduleName/

Use the below command to get the things working:

pip install --upgrade setuptools --user python

Using the --user python flag will resolve the error in --upgrade flag .

If you are using python3:

pip3 install --upgrade setuptools --user python

 

Ubuntu Snipping Tool

Unlike Windows, Ubuntu has a snipping tool of it’s own.

It’s named as gnome-screenshot.

Have a look at Screenshot. You can find it in Ubuntu Software.

http://apt.ubuntu.com/p/gnome-screenshot

However, there’s also a shortcut key associated in Ubuntu for taking snippets.

Hold down the Shift + PrtScn keys together.

Your mouse will change to a cross-like pointer.
Hold down your left-click key on the mouse and drag.

This uses gnome-screenshot behind the scenes.

You can change the keyboard shortcut via the regular keyboard settings.

STS on Ubuntu launchbar

  1. Open a text editor
  2. Copy and paste the following text into the editor:
    [Desktop Entry]
    Version=1.0
    Name=Eclipse
    Comment=Java IDE<br>Type=Application
    Categories=Development;IDE;
    Exec=/home/{username}/Programs/eclipse/eclipse<br>Terminal=false
    StartupNotify=true
    Icon=/home/{username}/Programs/eclipse/icon.xpm
    Name[en_US]=Eclipse
  3. Update any paths if you extracted Eclipse to a different location
  4. Save the file as eclipse.desktop in /home/{username}/.local/share/applications/
  5. Reboot your machine
  6. Search for Eclipse
  7. Drag and drop the Eclipse icon to the launcher