Tutorial for installing pycar on Linux
This is the work-in-progress install document for pycar on Linux. It's pretty barebones, but it coveres the basic points (it's also very debian specific). With help from jbors, I think I got it all. I invite anyone to post improvements. jbors you are welcome to re-use this however you want.
This first post has been edited a lot from the original, so some later posts (like comments on direct framebuffer support) may not make sense. I asked many questions in this post before stripping it down to just the install, jbors was just patiently answering my questions.
--- START INSTALL DOCUMENT HERE ----
I'm starting with Debian testing on a VIA M10000. It's pretty stock (and fat right now). I do have the updated X with the opensource unichrome driver from http://www.physik.fu-berlin.de/~glaweh/
- I installed the python and python-dev debian virtual packages (it's python 2.3).
- There are several *-dev package dependencies that pygame and pymedia need. In debian (and probably redhat/fedora), the header files for compiling against come in different packages than the libs themselves. [NOTE: need details on which packages!]
- I downloaded pygame-1.6.2 sources from the pygame website. jbors has a patch of pygame-1.6, but I think this patch is already in pygame-1.6.2. I built pygame by running "python setup.py build; python setup.py install" from inside the untar'd directory. [NOTE: can someone confirm that with pygame-1.6.2 no patch is required?]
- I installed the libavcodec-dev debian package that contained some of the codecs pymedia wants. I didn't download lame, I downloaded and built faap2.
- I downloaded/untar'd pymedia from the pymedia site. cd into the directory. Run "python setup.py build" then "python setup.py install".
- I tested the pymedia by running "python", then typing "import pymedia" at the cmd prompt. No output (I guess this means no problems). Ctrl-D out of python prompt.
- I downloaded/untar'd pyRXP from http://www.reportlab.org/pyrxp.html. cd into the directory (it's actually the pyRXP subdir under the top level untar'd directory). Run "python setup.py build" then "python setup.py install".
- I downloaded/untar'd pycar from the pymedia site. I also downloaded the 188.8.131.52 zip file for Windows. After unzipping to a different directory, I copied the skins directory from the zip file on top of the empty skins directory in my untar'd directory. You can now get rid of the zip file and the unzipped directory. [NOTE: This should really be fixed in the tar distribution. jbors, want me to send you an updated tar?]
- cd into the untar'd pycar directory. Run "python pycar.py ." That's it!
--- END INSTALL DOCUMENT HERE ----
Ok, giving pycar another try.
I went over to try and run headunit for a day. That went pretty smooth. jbors PM'd me offering help, that was nice of him, so I thought I would try harder to get pycar working. I'll edit my first post with instructions when I'm done, in the meantime I'll post the bits as I do them:
- I decided against my "no patch pygame" policy. So I went backed out of the framebuffer idea, uninstalled debian's pygame package and went and got the source. I ened up with pygame-1.6.2 instead of 1.6, maybe that will bite me. The patch didn't apply cleanly, in fact I don't think it applied at all. What I mean is I think those changes are in the source for pygame-1.6.2 already. That would be good news, jbors, maybe the pygame people accepted your patch?
- compiling pygame complains about several libs so I went and installed lib-sdlttf-dev and such. pygame compiled and installed.
- When to run "python pycar.py", ARRGH! Another error. No such file or directory: 'skins/pycar.cfg'.
After some investigation and re-downloading pycar-184.108.40.206-pre2-src.tar.gz I discovered that the tar package HAS NO SKINS!!!! Are you kidding me? The package isn't even complete.
- I download the zip file 220.127.116.11-pre2.zip file, unzip it and copy it's skins directory to my pycar directory.
- Now I'm getting some locale problem. My LANG environment variable was set to en_US, I got this:
Any help would be appreciated.
headunit:~/pycar-1.2.3-pre2-src# python pycar.py
open /dev/sequencer: No such file or directory
Looking for translation file for language: ['en_US', 'en_gb']
!!!No translation file for en_US, see README file for more information
Falling back to english...
Traceback (most recent call last):
File "pycar.py", line 246, in ?
mainTest( s )
File "pycar.py", line 133, in mainTest
locale.setlocale( locale.LC_ALL, 'us' )
File "/usr/lib/python2.3/locale.py", line 381, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
Background tasker started
Background tasker stopped