Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Tutorial for installing pycar on Linux

  1. #1
    Maximum Bitrate kbyrd's Avatar
    Join Date
    Nov 2003
    Location
    Northern Arizona
    Posts
    485

    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 1.2.3.0 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 ----
    My worklog.
    Status: VM GTI sold, got out of the CarPC tinkering hobby, but I still think about getting back in.

  2. #2
    FLAC jbors's Avatar
    Join Date
    Nov 2003
    Posts
    959
    Quote Originally Posted by kbyrd
    Ok, so the documentation for getting Pycar running on Linux system sucks.
    Since just *****ing helps very little, I thought I'd document what I had to do. I hope others add/correct it, because I know my worklog is very debian specific. For things like packages it would be nice to see something like:
    Ok. I got the point
    Actually I was waiting for someone who can document the whole process like you
    Here is the sequence in short:
    1. Install pymedia: http://indashpc.org/vbullettin/viewtopic.php?t=31
    2. Get pygame-1.6 from sources and update it with the patch: http://66.159.221.186/pygame-1.6-overlay.patch.gz
    3. Get pyrxp: http://www.reportlab.org/pyrxp.html
    4. Get the pycar from sources and just run: "python pycar.py ."

    Quote Originally Posted by kbyrd
    I have little/no framebuffer experience, so I'm no surprised I ran into trouble here. I'll finish this when I get a chance. Any help is appreciated. Here's a crazy question to display my ignorance of directfb. Does a directfb app run under X? I thought it was framebuffer or X, not an app in an X session using the framebuffer.
    Directfb delivers small footprint and HW accelerated graphics. If you prefer to use X that's fine, do not define export PyCAR_DISPLAY=directfb; and it will use pygame by default.
    Basically you can run XDirectfb just fine and will run some X apps, but in general it won't be fully X compatible...
    PyCar can use either of those it can run in a window if you use pygame. When directfb is concerned it will run in fullscreen...
    Car pc integration with ease
    Car mediacenter

  3. #3
    Maximum Bitrate kbyrd's Avatar
    Join Date
    Nov 2003
    Location
    Northern Arizona
    Posts
    485

    Angry 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-1.2.3.0-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 1.2.3.0-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:
    Code:
    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
    Any help would be appreciated.
    My worklog.
    Status: VM GTI sold, got out of the CarPC tinkering hobby, but I still think about getting back in.

  4. #4
    FLAC jbors's Avatar
    Join Date
    Nov 2003
    Posts
    959
    Try this:
    Code:
    python pycar.py .
    It is covered in README file.
    Now some clarifications:
    1. Pygame did accept patch but release 1.7 has been pushed back due to maintainers problems.
    2. Pycar package is complete. Pycar is not an application, it is a framework for building your own application. It has no logic whatsoever inside. Skin is a set of even handlers that makes the application.
    Car pc integration with ease
    Car mediacenter

  5. #5
    Maximum Bitrate kbyrd's Avatar
    Join Date
    Nov 2003
    Location
    Northern Arizona
    Posts
    485

    I got pycar working!

    Again, thanks to jbors. This is a long post. But I think it's useful. Please understand that I'm not just bashing jbors and his work. I really like pycar, I just think that the Linux distribution for this app isn't enough.

    I left off with "python pycar.py" giving me locale errors. jbors suggested "python pycar.py ." This worked!

    Let me respond to jbor's comments:
    - About pygame. It may be the pygame 1.6.2 (which is not available) has your patch in it. It didn't apply cleanly (obviously not your fault since you said to use 1.6), and it looks like the code changes from the patch file are already in (I didn't verify the big binary blob).

    - About "python pycar.py ." and being covered in the README file. Which README file? At first, I skipped over most of the pycar/README file since it's clearly written for Windows users. I went back after I had trouble and actually read it (I know, I always read the instructions AFTER I have problems), I cannot find a single reference to running pycar on anything but Windows. There is nothing in there to indicate I need to add the current directory to the cmdline as you suggested. So, I went looking for a README in pymedia, there is none. It's not covered in the README file, but it should be.

    - About missing skins. What do you mean "pycar is not an application"? Of course it is! When I tried the Windows .zip package I unzipped it, read the README, ran the application and it ran! I really liked the UI, I wanted to try it on Linux. I figured it would be the same since your website says: "No modifications or recompilation needed to run PyCar on Linux vs Windows or vise versa". So, I went and grabbed the tar.gz file untar'd it and eventually discovered that the skins directory is empty. I understand that people can create their own skins, you made a skinable application. That's one of the many things I like about it. But, lets say I've never used the Windows version, I see pycar listed as a Linux front end on these forums, and I think "Great!", I go download the tar package only to find I have to make a skin before I can even run the app for the first time? How do I know what the skin is supposed to look like? It's pretty standard to include a default skin in a skinable app, either compiled in or just part of the skins directory, just like you do for the Windows distrobution.


    So, to finish this off, nice work. I like the app. It's clearly a work in progress, but that's not a surprise, you have said that. My installation was hard. Much of that was my fault, I had to install the *-dev packages (for many packages debian installs just the libs, you have to get libsdl-dev to get the headers to compile against). However, I cannot see how I would have soved the last two issues using just the Linux tar package provided:

    - I needed to copy skins dir from windows zip file. Why is the skins directory empty?

    - Having to add the current dir to the cmdline to run pycar "pthon pycar.py .", that is not documented anywhere that I can tell.

    In any case, the whole point is to make the software better, right? So, I'll begin editing my first post to give a more complete set of instructions for others.
    My worklog.
    Status: VM GTI sold, got out of the CarPC tinkering hobby, but I still think about getting back in.

  6. #6
    Maximum Bitrate kbyrd's Avatar
    Join Date
    Nov 2003
    Location
    Northern Arizona
    Posts
    485
    How do we make this a sticky?
    My worklog.
    Status: VM GTI sold, got out of the CarPC tinkering hobby, but I still think about getting back in.

  7. #7
    FLAC jbors's Avatar
    Join Date
    Nov 2003
    Posts
    959
    Thanks for stepping in. Great HOWTO !
    Car pc integration with ease
    Car mediacenter

  8. #8
    FLAC jbors's Avatar
    Join Date
    Nov 2003
    Posts
    959
    kbyrd, can I use this how to on my forum ? Or if you can post it in the software section I will really appreciate it.
    http://indashpc.org/vbullettin/viewforum.php?f=4
    Car pc integration with ease
    Car mediacenter

  9. #9
    Maximum Bitrate kbyrd's Avatar
    Join Date
    Nov 2003
    Location
    Northern Arizona
    Posts
    485
    Quote Originally Posted by jbors
    kbyrd, can I use this how to on my forum ? Or if you can post it in the software section I will really appreciate it.
    http://indashpc.org/vbullettin/viewforum.php?f=4
    Sure, please use this however you want, in your distributions, on your forums, whatever.
    My worklog.
    Status: VM GTI sold, got out of the CarPC tinkering hobby, but I still think about getting back in.

  10. #10
    Maximum Bitrate Change's Avatar
    Join Date
    Aug 2004
    Location
    California
    Posts
    482
    Where does one get the latest source for pycar? I've found 1.2.3-pre2, but I'm having some problems with that (errors out with "AttributeError: 'module' object has no attribute 'Mixer'", but pygame was built with mixer support...not sure what's up)

    (btw, the Debian SDL packages I installed are:
    libsdl-image1.2
    libsdl-image1.2-dev
    libsdl-mixer1.2
    libsdl-mixer1.2-dev
    libsdl-ttf1.2
    libsdl-ttf1.2-dev
    libsdl-ttf2.0-0
    libsdl1.2-dev
    libsdl1.2debian-all
    libsdl1.2debian
    python2.3
    python2.3-dev
    python-dev
    lost track of what other packages I've installed...pygame1.7.1 from source, pyRXP1.07 from source, pymedia 1.2.2.1)

Page 1 of 2 12 LastLast

Similar Threads

  1. New Frontend for Windows and Linux
    By gbr in forum Other Cool Front Ends
    Replies: 68
    Last Post: 01-21-2009, 08:55 PM
  2. PyCar Linux distro TS check( EPIA-M )
    By jbors in forum Linux
    Replies: 17
    Last Post: 05-04-2005, 01:33 PM
  3. PyCar roadmap
    By jbors in forum PyCar
    Replies: 24
    Last Post: 03-29-2005, 07:08 AM
  4. The LOW Risk Linux Adventure...
    By grepzen in forum Software & Software Development
    Replies: 13
    Last Post: 11-08-2004, 09:12 PM
  5. PS2 Linux -- check it out
    By Superfly in forum General Hardware Discussion
    Replies: 7
    Last Post: 03-21-2003, 11:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •