How to Install Pithos in Windows

Update Sept 2015: This blog is over two years old at this point and some kind readers have posted updated links and info in the comment section down below. Be sure to read through those prior to following this guide! Thanks and enjoy!

What is Pithos?

Pithos is a Linux application that allows you to stream music from Pandora.com without having to use the Pandora web player, which is more resource intensive and mostly featureless unless you pay for a Pandora One account. With Pithos you can use the media keys on your keyboard, show artist/song information via desktop notifications, and best of all – remove all advertisements. You can find more information about Pithos here, including a list of all of its other features. What you won’t find on the Pithos website is a Windows installer, which is what this guide is for.

Thanks to Mike Mehall for the original Pithos app and TingPing for the Windows version!

 image

image

List of Programs We Will Need

If you are running 64-bit Windows, make sure you download the 64-bit versions.
I wasn’t able to run Pithos using the 32-bit versions in Windows 7 64-bit.

1. Either the 32-bit version or the 64-bit version of Python 2.7.3.

2. Either the 32-bit or 64-bit version of the GStreamer SDK Runtime from:
http://docs.gstreamer.com/display/GstSDK/Installing+on+Windows
Make sure you get the file ending in (Runtime) for your specific version.
For example, GStreamer SDK 2012.11 (Brahmaputra) for Windows 64 bits (Runtime).

3. Pithos for Windows

Optional Downloads:
pyHook and pyWin32 (used for media key functions)
distribute, pip, gntp, and Growl for Windows (used for desktop notifications)

 

Installing Pithos

Download and run the Python 2.7.3 installer using one of the two links found above.

Make sure you install Python to the default directory, C:\Python27\

All the other default installation settings are fine.

image

Once Python is installed, download and run the correct GStreamer SDK Runtime installer.

When asked what type of installation you want, choose Custom.

image

On the Custom Install page make sure you do all of the following:

1. Scroll down the list and make sure that none of the items up to Snappy Media Player
have a red X to the left of them.

2. Click the red X next to ‘GStreamer restricted codecs with potential patent issues in some
countries’ and then click ‘Will be installed on local hard drive’.

3. Make sure the installation directory is C:\gstreamer-sdk\

Here is what it should look like.

image

After the GStreamer install finishes, download and run the Pithos for Windows installer.

All the default install settings are fine.

The basic installation is now complete.

If you are using the 32-bit version, you should be able to find Pithos in your list of programs in the Start Menu and run it successfully. If you are interested in using the media keys on your keyboard or want to make Pithos show artist/song/album info via desktop notifications when songs change, then scroll down to the Optional Functions Setup section.

If you are using 64-bit then you need to do one more thing before Pithos will start, then you can play with the extra features.

64-bit Fix:

There are two lines in Pithos.bat that are incorrect.

Open up My Computer from the Start Menu –> Browse to C:\Program Files (x86)\Pithos –> Right-click Pithos.bat –> Click Edit

Pithos.bat should now be open in Notepad.

We need to change two lines in this batch file.

Scroll down until you see

REM For some reason the GStreamer SDK doesn’t define the environment
REM variables globally, so we just have to cheat if we can’t do it
REM the ‘correct’ way
if exist C:\gstreamer-sdk.10\x86\bin goto found_pygst_x86_hardcoded
if exist C:\gstreamer-sdk.10\x64\bin goto found_pygst_x64_hardcoded
goto nogst

and change the line

if exist C:\gstreamer-sdk.10\x64\bin goto found_pygst_x64_hardcoded

to

if exist C:\gstreamer-sdk.10\x86_64\bin goto found_pygst_x64_hardcoded

Then, two blocks of text later you should see

:found_pygst_x64_hardcoded
set GSTREAMER_SDK_ROOT_X64=C:\gstreamer-sdk.10\x64
set GST_SDK=%GSTREAMER_SDK_ROOT_X64%
set GST_VIA=hardcoded path
goto pygst_env_found

change the line

set GSTREAMER_SDK_ROOT_X64=C:\gstreamer-sdk.10\x64

to

set GSTREAMER_SDK_ROOT_X64=C:\gstreamer-sdk.10\x86_64

Close notepad and click Save on the dialog box that pops up.

Now double click Pithos.bat and see if it loads correctly.

After changing these two lines of code, Pithos loaded correctly for me in Windows 7 64-bit.

 

Optional Functions Setup

Media Keys

Some keyboards, like my Logitech G510, just don’t seem to work with pyHook. Not sure what the problem is, might even be a bug with Pithos. So if you follow all these steps and your keys still don’t work, you are not alone. Try googling for solutions, if you find one, post a comment. Honestly, the media keys are just a luxury for when you are gaming or using some other full-screen application. You can always just right click the Pithos icon in the taskbar to access all the control functions anyways.

If you are using 32-bit then skip to the ‘For 32-bit and 64-bit section’.

For 64-bit Windows Only
For some reason the 64-bit Python installer doesn’t make a new registry key that tells other programs where Python was installed. We have to do this ourselves. It’s silly, but it is easy to fix. I made a .reg file that will create the registry key for you, which you can download here. It only adds one key to the registry and nothing else, I promise. Feel free to right click the file after you save it and hit edit so you can verify that it’s safe. To run it, just save it to your desktop or wherever is convenient and then double click it. You can now skip ahead to the ‘For 32-bit and 64-bit section’.

If you enjoy doing things yourself, or are paranoid about running registry files from random blogs on the internet :P, you can use the following, slightly more complicated, method.

1. Run regedit from the Windows Start menu run option or search box.
2. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7
3. Right click the 2.7 key, select New, and then Key.
4. Name the new key InstallPath
6. Make sure you still have the InstallPath key highlighted to the left.
7. Right click the value labeled (Default) in the panel to the right.
8. Click Modify…
9. Enter C:\Python27 into the ‘Value data:’ field and click OK.

Your screen should now look similar to this.

image

Go ahead and close regedit.

For 32-bit and 64-bit

Download and run the pyHook installer.

If you see the error message below, then you are still missing a registry entry pointing programs to where Python was installed. So go back up to the previous section and try again.

image

If the installer completes successfully then,
Download and run the pyWin32 installer.

Now that both pyHook and pyWin32 are installed, run Pithos, click the icon with a wrench, and then click Settings. Then just check the following box and click OK.

image

You should now (hopefully) be able to use your media keys.

 

Desktop Notifications

Pithos uses Growl for desktop notifications.

First, we need to download two files from:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
The website disables linking to files directly and it is incredibly long, so you will have to use the links below and get the files yourself.

If you are using 32-bit:
Click here and download distribute-0.6.35.win32-py2.7.‌exe
Click here and download pip-1.3.1.win32-py2.7.‌exe

If you are using 64-bit:
Click here, download distribute-0.6.35.win-amd64-py2.7.‌exe, and install it.
Click here, download pip-1.3.1.win-amd64-py2.7.‌exe, and install it.

If you are running 64-bit and encounter an error about not being able to locate the Python 2.7 install directory, follow the ‘For 64-bit Only’ section for setting up media keys (scroll up) and then try installing both files again.

Now that distribute and pip are installed, we need to install gntp. This is basically a service that runs in the background and lets programs tell Growl that they want to popup notifications on your desktop.

To install it, open a command prompt window. Usually done by typing cmd in the Start Menu run or search box and hitting enter.

With command prompt open, do the following:

1. Type cd c:\python27\scripts and hit enter.
2. Type pip install gntp and hit enter.

You should see a message saying that gntp install successfully.

image

Close the command prompt window.

Download and install Growl for Windows

All the default settings are fine.

Now run Growl, there is a probably a shortcut on your desktop.

Run Pithos, click the wrench icon, click Settings, and check the ‘Show Growl notifications’ box.

image

Try switching tracks in Pithos and you should see a desktop notification show up with the current song information. If nothing shows up, close and reopen Pithos, and try again.

Mine looks like this.

image

 

Now just enjoy some great music for free 🙂

If you have any questions or see something I missed, leave a comment below.

This entry was posted in Guides and tagged , , . Bookmark the permalink.

13 Responses to How to Install Pithos in Windows

  1. mark says:

    i keep getting “The Python bindings for Gstreamer could not be imported. Please re-run the installer and ensure that the python bindings are selected” and i have 6 or seven times and still no luck.

    • Make sure you have Python installed to the default directory of C:\Python27
      If you are using 64bit installers check if you have a file named pygst.py in C:\gstreamer-sdk.10\x86_64\lib\python2.7\site-packages
      If you are using 32bit it will be found in C:\gstreamer-sdk.10\x86\lib\python2.7\site-packages
      Let me know and we can go from there 🙂

      • Randys says:

        I get the same error, I have all the files in the proper directories and I get the same error. ftw im running Win 8 64bit

      • Hmm. I’ll install Windows 8 64-bit in VirtualBox later tonight to see if there is some issue I’m overlooking since I’m still using Windows 7.

  2. @Randys: Sorry for the late reply, had some coding to catch up on. I went through the guide using a fresh Windows 8 64-bit install and it ran perfectly. The only small snag I ran into was with editing pithos.bat after everything was installed. By default with file name extensions hidden, Notepad tried to save the file as .txt even though I specified .bat. So I would double check to see if pithos.bat has the required changes saved.

  3. Caleb says:

    I ran into Randy’s issue when using the v8 installer. The v8_beta works fine. The issue is somewhere in the v8 installer’s pithos.bat file. I didn’t spend time troubleshooting it, but did verify that using the (x86_64 corrected) pithos.bat file from the beta will work with the v8 installation of pithos.

  4. Al Mendoza says:

    [I got it to work… finally] Hey Guys I had the same error “The Python bindings for Gstreamer could not be imported. Please re-run the installer and ensure that the python bindings are selected”. What I did to fix this was to change the name of the folder within gstreamer. Since Exaile searchs for gstreamer in C:\gstreamer-sdk.10\x86 while mine was installed in C:\gstreamer-sdk.10\x86_64. I renamed the latter to “x86” and I managed to pass the requirements at last. For this to work you need skip the step of editing the .bat file. If you already edited that file just go back and delete/reinstall pithos. Hope this helps.

  5. Jason says:

    Had the same python bindings error with pithos v8 (32-bit), python 2.7.8 (64-bit), and 64-bit Gstreamer. Since I couldn’t find the v8_beta files as Caleb suggested above, I used the pithos.bat from the pithos 64-bit zip (https://github.com/TingPing/pithos-for-windows/archive/master.zip), and everything works now.

  6. Dan says:

    the link for pithos has changed
    https://dl.tingping.se/win32/pithos_for_windows/
    that should ge you to the root and you can choose your version from there

  7. Rob says:

    Hello, All!

    Let me begin by saying ‘thank you’ for this tutorial! it’s definitely ‘Python for Dummies”. I was successful in using it to install Pithos and Growl, but I had to do some tweaking, as follows
    :
    1. Your link for Pithos is incorrect. Using the link below, I was able to get it:

    https://dl.tingping.se/win32/pithos_for_windows/Pithos_Installer-Version8.exe
    ^^^^^^

    2. Distribute has been replaced by setup_tools, so I had to use THAT to install pip and gntp, Rather than trying to figure it out in Python, I found it as an .exe here:

    https://advandb-repository.googlecode.com/files/setuptools-0.6c11.win32-py2.7.exe.

    Once setup_tools was installed, with a command prompt open, I did the following:

    3. Typed cd c:\python27\scripts and hit enter.
    4. Typed easy_install pip and hit enter.
    5. Typed easy_install gntp and hit enter.

    If/when I get time, I might write a batch file to go fetch and install all the pieces automatically, and then throw EVERYTHING up into ‘the cloud’ somewhere…

  8. Rob says:

    You’re quite welcome!

    I run Pithos in Linux Lite and Lubuntu, so out of curiosity, I Googled to see if there was a Windows version. Glad there is! Here’s more:

    I put this in the Pithos folder as growl-pithos.bat:

    @echo off
    rem Growl
    cd C:\Program Files (x86)\Growl for Windows
    start growl.exe
    rem Pithos
    cd C:\Program Files (x86)\Pithos
    start pithos.bat
    exit

    I then changed pithos.bat as follows. For brevity, I just copied the areas around the areas that were changed.

    To save changes, your favorite text editor has to be “Run as Administrator’ by right-clicking on its start icon and selecting that option:
    – Top of batch file –
    @echo off
    REM
    REM Win32 launch script for Pithos based on Exailes
    REM
    REM Since GStreamer SDK and OSSBuild are a bit difficult to work with, we
    REM go through and set things up for the user so they don’t need to worry
    REM too much about PATH variables being set properly and other madness.
    REM
    REM Additionally, this script tries to be a bit more verbose and let the
    REM user know more about the errors that they are seeing, instead of just a
    REM stack trace.
    REM

    C:\Program Files (x86)\Growl for Windows\growl.exe

    setlocal
    -end of changes –

    and added an ‘exit’ command to the end of the file to close the window on the desktop:

    Lastly, I created a shortcut on the desktop to point to the growl-pithos batch file and changed its icon to the Pithos icon. I only use Growl for Pithos, so I wanted one desktop icon to run both on demand.

    Enjoy!

Leave a comment