Menu

Installation on OSX / macports

2010-10-26
2013-03-08
  • Jean-Philippe CIVADE

    Dear All,

    I followed instructions on  http://sourceforge.net/projects/pycam/forums/forum/860183/topic/3800091 as told on INSTALL.TXT of pyCAM.

    Since the last post say there should be no anymore problems on installing gtkglext since macports have been fixed, on MacBook Pro / OSX Snow Leopard, latest updates, i've typed :

    sudo port install py25-gtk 
    sudo port install py25-gtkglext
    sudo port install py25-ode 
    sudo port install py25-opengl
    

    I tried to launch pycam (latest SVN checkout, or latest archive, results are the same…) using

    python2.5 pycam
    

    PyCam launch, but complains : "Failed to initialize the 3D model view. Please install 'python-gtkglext1' to enabe it."

    Since i've installed it ("sudo port install py25-gtkglext"), what's the problem???

    Thanks for answering…

     
  • Lars

    Lars - 2010-10-26

    Hi jpcivade,

    I don't have access to a MacOS environment, thus I can't test it. But I guess, you need to use the explicit path of Python2.5 in MacPorts:

    /opt/local/bin/python2.5 pycam
    

    I am not sure about this specific path - please adapt it to your system)

    A simple test could be to run python interactively and then type "import gtkglext".

    cheers,
    Lars

     
  • Jean-Philippe CIVADE

    Hi Lars,

    Thanks for your quick answer. Macports patch the PATH env during install, so there's there's theorically no need to specify the complete path. However, i've already tested :
    * Patching pycam command with #!/opt/local/bin/python2.5
    * calling pycam with complete path (/opt/local/bin/python2.5 pycam
    * explicit path of pthon and pycam /opt/local/bin/python2.5 /Users/jpcivade/Downloads/pycam-0.4/pycam

    Resuls are always the same :

    Psyco is not available (performance will probably suffer slightly)
    Disabled parallel processing
    Xlib:  extension "RANDR" missing on display "/tmp/launch-L2INvM/org.x:0".
    Imported STL model: 75 vertices, 0 edges, 46 triangles
    Failed to initialize the interactive 3D model view.
    Please install 'python-gtkglext1' to enable it.

    …  any other idea?

     
  • Lars

    Lars - 2010-10-26

    Hi jpcivade,

    I don't know the relationship between OpenGL and randr, but maybe it is necessary. See MacPorts-FAQ for details.
    But I think, this will not help …

    Could you check your version of py25-gtkglext and compare it to the version described as broken in the other thread?

    What happens if you start python2.5 and run the following?

    import gtk.gtkgl
    import OpenGL.GL as GL
    import OpenGL.GLU as GLU
    import OpenGL.GLUT as GLUT
    

    greetings,
    Lars

     
  • Peter Uithoven

    Peter Uithoven - 2011-01-02

    Has anyone bin sucsefull in getting Pycam running on OS X?

    I tried the imports:
    peteruithoven:pycam Peter$ python2.5
    Python 2.5.5 (r255:77872, Jan  2 2011, 04:49:48)
    on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gtk.gtkgl import OpenGL.GL as GL import OpenGL.GLU as GLU import OpenGL.GLUT as GLUT
      File "<stdin>", line 1
        import gtk.gtkgl import OpenGL.GL as GL import OpenGL.GLU as GLU import OpenGL.GLUT as GLUT
                              ^
    SyntaxError: invalid syntax
    >>> import gtk.gtkgl; import OpenGL.GL as GL; import OpenGL.GLU as GLU; import OpenGL.GLUT as GLUT;

    (process:97579): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
    Xlib:  extension "RANDR" missing on display "/tmp/launch-bxnVWm/org.x:0".
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named gtkgl

    It feels like I'm installing half of a Linux operating system to get it working, or is that just me?

     
  • Jean-Philippe CIVADE

    Not me… I tried this morning an other way, using other way, but same results.

     
  • Lars

    Lars - 2011-01-03

    Hi,

    sorry that I can't really help here, since I have no Mac environment around.
    But for the clarification of the problem - could you please post the output of the following commands:

     port list | grep "py.*-gtk"
     port list | grep "py.*-opengl"
    

    thanks!
    Lars

     
  • Peter Uithoven

    Peter Uithoven - 2011-01-04

    That gives:
    peteruithoven:~ Peter$ port list | grep "py.*-gtk"
    py26-gtkhtml2                  @2.25.3         gnome/py26-gtkhtml2
    py26-gtkspell                  @2.25.3         gnome/py26-gtkspell
    py-gtk2                        @2.12.1         python/py-gtk2
    py-gtkmvc                      @0.9.2          python/py-gtkmvc
    py25-gtk                       @2.22.0         python/py25-gtk
    py25-gtkglext                  @1.1.0          python/py25-gtkglext
    py26-gtk                       @2.22.0         python/py26-gtk
    py27-gtk                       @2.22.0         python/py27-gtk
    peteruithoven:~ Peter$ port list | grep "py.*-opengl"
    py-opengl                      @3.0.1b2        python/py-opengl
    py25-opengl                    @3.0.1b2        python/py25-opengl
    py26-opengl                    @3.0.1          python/py26-opengl
    py26-opengl-accelerate         @3.0.1          python/py26-opengl-accelerate
    py27-opengl                    @3.0.1          python/py27-opengl
    py27-opengl-accelerate         @3.0.1          python/py27-opengl-accelerate

    Is that the way it should be?

     
  • Lars

    Lars - 2011-01-05

    Hi Peter,

    at least the version of py25-opengl (3.0.1b2) looks like it is not required version (according to the other forum posting: http://sourceforge.net/projects/pycam/forums/forum/860183/topic/3800091).
    Can you update it somehow? Or did you try to apply the patch that was described in the other post?

    cheers,
    Lars

     
  • Lars

    Lars - 2011-04-10

    I just wrote a wiki page dedicated to the installation on Mac OS X. Please check if you find a solution there!

    http://sourceforge.net/apps/mediawiki/pycam/index.php?title=Installation_MacOS

     

Log in to post a comment.