[Tutor] Trying to get mp3play-0.1.15 module to work on Windows 7

Jim Mooney cybervigilante at gmail.com
Tue Jun 11 03:19:30 CEST 2013


On 10 June 2013 12:01, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> On 10/06/2013 18:48, Michael Sparks wrote:
>>
> What doesn't work about the installation instructions here
> http://code.google.com/p/mp3play/ ?

I think they want the full error list, preferably from the ms-dos
command line so the editor doesn't interfere. Here's my two cents
anyway:

I'm new at this and just went through figuring a lot of this module
garbola, so I might as well share ;'). If you don't like this idea or
it's voted down, ignore it, but here is what I think is the easiest
way, which is to start over. Uninstall your python. Go to
http://www.activestate.com/activepython/downloads and download theirs
to install on your laptop.

Download py2.7 - for x86 - I had compatibility problems with the 64
bit download even though I have a 64 bit computer. You don't need
64-bit if it's a hassle and 32 bit will play on either computer.
Especially if you're operating fro two computers that might have
different word sizes.

The ActiveState python already has pip (an automated module installing
program), along with a few other extras, which makes installing
modules very easy, and also uninstalling, which can otherwise be a
hassle. Yes, it is good to learn the intricacies of manual module
installation after you learn a bit of python, but I think the
complexity of that at first is a roadblock that can be done without
for a time.

If you don't use the ActiveState install you have to install
setuptools first, then install pip, and the first install for pip I
found for 2.7 was a bare text file I had to copy to a file and save,
then run, so it's a big hassle. Py 3.3 has a complete windows
installer for pip, though. I don't know about 2.7 since I had already
done it the hard way ;')

So if you went ActiveState to do it the easy way, you just go to the
ms-dos command line after pyton installs (cmd in my Find bar in win 7)

type     pip install mp3play     and enter.

mp3play is in PyPI so it downloads and installs.

Oh, if you already installed mp3play partially and it didn't work,
type   pip freeze  in msdos first, to get a list of what's installed.
Then, if you see mp3play in the list,  pip uninstall mp3play   to
start over so you can copy the install error messages from the dos
command console. pip will often uninstall anything it finds with
freeze, even if it didn't install it. I already did that and was
surprised it did, since I saw mention it had to install to uninstall.
I mention uninstalling because I tried reinstalling to get the error
list, but it had installed enough to not reinstall. If you can still
install with the Same error messages you got, you don't have to
uninstall it because it never installed.

Come to think of it, the defective mp3play shouldn't be there if you
uninstalled Py properly, and reinstalled it; although if the uninstall
left a directory, as some uninstalls do, that might not be the case.

This way, after running   pip install mp3play  , if it didn't work you
should see a bunch of error messages in the dos box. If there are no
error messages, pip worked and it installed, so the problem now is to
figure out how to use mp3play.  If import mp3play   works in Python,
it's there.

Alternatively, if the install gave error messages in the dos window,
just drag-highlight any errors on the msdos screen (it's a column
highlight), and right click to copy so you can post here. Then you
have the error messages everyone can parse.

If you just want to see if Python can play a sound file, import
winsound, which is already a part of Python, and you can play wav
files only (See how by printing help(winsound) in Python, after
importing winsound.) The winsound help is easy to follow. I found the
mp3play instructions a bit terse. (mp3play doesn't actually work on py
3.3, even after I tried some fixups, mostly of print statements, but
it installed and uninstalled just fine, with pip. I don't have a need
for it right now. I can always record a wav and play it with winsound,
with no module installs necessary, if I want a verbal program warning
or something. It might be nice to have the except statements shout
"You screwed up!" Actually, that sound like fun. I think I'll go do
it.)

For win 7, though, the windows sound recorder now records wma rather
than wav, as it used to, so you need something else, like Audacity, to
make a wav.

Or get a wav file from windows\media - the raga folder has some nice sounds.

-- 
Jim
Today is the day that would have been tomorrow if yesterday was today


More information about the Tutor mailing list