I’ve started writing an mp3 database, podcatcher, media player, rockbox syncher type thing. This got me to looking for some python modules on the internet today. I found one I was interested in called eyeD3. It looked good so I tried downloading it.
This is where I had the first problem. Usually, python modules come as precompiled exes for windows machines. There wasn’t one. No problem, I downloaded the .tar.gz file, used 7-zip to unpack it.
Now, to “install” modules this way, at this point, one usually runs something like “python setup.py install” from within the folder/directory where you unzipped the module. I tried that and got an error:
C:\eyeD3-0.6.17>c:\Python25\python.exe setup.py install
c:\Python25\python.exe: can’t open file ‘setup.py’: [Errno 2] No such file or directory
ARG.
Well, I went looking…sure enough, within my eyeD3-0.6.17 directory, there was a setup.py.in file. Easy…I just renamed it to setup.py. Reran the command and got this:
C:\eyeD3-0.6.17>c:\Python25\python.exe setup.py install
running install
running build
running build_py
package init file ‘src\eyeD3\__init__.py’ not found (or not a regular file)
creating build
creating build\lib
creating build\lib\eyeD3
copying src\eyeD3\binfuncs.py -> build\lib\eyeD3
copying src\eyeD3\frames.py -> build\lib\eyeD3
copying src\eyeD3\mp3.py -> build\lib\eyeD3
copying src\eyeD3\tag.py -> build\lib\eyeD3
copying src\eyeD3\utils.py -> build\lib\eyeD3
package init file ‘src\eyeD3\__init__.py’ not found (or not a regular file)
running install_lib
creating c:\Python25\Lib\site-packages\eyeD3
copying build\lib\eyeD3\binfuncs.py -> c:\Python25\Lib\site-packages\eyeD3
copying build\lib\eyeD3\frames.py -> c:\Python25\Lib\site-packages\eyeD3
copying build\lib\eyeD3\mp3.py -> c:\Python25\Lib\site-packages\eyeD3
copying build\lib\eyeD3\tag.py -> c:\Python25\Lib\site-packages\eyeD3
copying build\lib\eyeD3\utils.py -> c:\Python25\Lib\site-packages\eyeD3
byte-compiling c:\Python25\Lib\site-packages\eyeD3\binfuncs.py to binfuncs.pyc
byte-compiling c:\Python25\Lib\site-packages\eyeD3\frames.py to frames.pyc
byte-compiling c:\Python25\Lib\site-packages\eyeD3\mp3.py to mp3.pyc
byte-compiling c:\Python25\Lib\site-packages\eyeD3\tag.py to tag.pyc
byte-compiling c:\Python25\Lib\site-packages\eyeD3\utils.py to utils.pyc
running install_egg_info
Writing c:\Python25\Lib\site-packages\eyeD3-_PACKAGE_VERSION_-py2.5.egg-info
First glance it looks ok. So, I fire up IDLE and try to import the package. SHAZZBOT! It won’t work. I get told there is no such module. A quick google didn’t turn up anything so I started poking around.
Look at the output of the install above one more time. I missed it too:
package init file ‘src\eyeD3\__init__.py’ not found (or not a regular file)
So, I went looking around. Sure enough, the file it was griping about was ALSO named.py.in. Double Shazzbot. What kind of package is this?! Well, I rename the file, rerun the import, and everything appears to work.
I thought I would blog about this just incase someone else has these problems later on. I didn’t find anything on the web that would help me out or point me in the right direction.
Image from tambako the jaguar via flickr