Tag Archives: python

pip uses Python3 instead of Python2.7

If you are facing issue where pip chooses python3 over python2.7, then you need to use the correct alternative. Follow the following steps:

  1. First install pip for python2 and python3
    sudo zypper install python-pip python3-pip
  2. Choose the correct version
    sudo update-alternatives --config pip

    The following will be displayed

    There are 2 choices for the alternative pip (providing /usr/bin/pip).
    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/bin/pip3.4 30 auto mode
     1 /usr/bin/pip2.7 20 manual mode
     2 /usr/bin/pip3.4 30 manual mode
    Press enter to keep the current choice[*], or type selection number:
  3. Type 1 (option infront of pip2.7) and press Enter

Installing: Picapy – A Picasa Web manager

Google pulled out its support from picasa for linux back in 2012. Picasa 3.9 works fine on wine but I was looking for something native to linux and found picapy. A small application written in python.

Steps to install:

    • Download picapy from here
    • Extract picapy and rename folder to picapy
    • Download gdata from here
    • Extract gdata
    • Open terminal, go to gdata folder and type

sudo python setup.py install

    • Go to picapy folder in terminal and type

sudo mkdir /usr/share/picapy;sudo cp -R * /usr/share/picapy; sudo cp img/* /usr/share/picapy;sudo cp picapy.svg /usr/share/pixmaps;sudo cp picapy.desktop /usr/share/applications;sudo cp picapy.desktop ~/Desktop;

All set. You can read how to use here

Type on android using adb, python gui

As explained in the previous post, I thought of writing a small program to allow me to type using adb shell.

I created a python single file application for this. Here is the code.

How to run:

python DroidKeysPy.py

This would open up the program which would display a message to select the adb

SelectADB

Click OK, which would display the Open dialog box where you would select the adb location

Select ADB

Finally, the message box will be displayed where you can type the message and send.

DroidKeysPy

You can select adb later.

Here are the links I had open by the time I had completed the program: