title: dyld: Library not loaded (With Pyglet)
body: <p>I'm a newbie with python, and I'm trying to run a small tuto with using OpenGL on OSX.</p>
  
  <p>So my script is something like this:</p>
  
  <pre><code>import pyglet
  from pyglet.gl import *
  
  win = pyglet.window.Window()
  
  @win.event
  def on_draw():
  
      # Clear buffers
      glClear(GL_COLOR_BUFFER_BIT)
  
      # Draw some stuff
      glBegin(GL_LINES)
      glVertex2i(50, 50)
      glVertex2i(75, 100)
      glVertex2i(100, 150)
      glVertex2i(200, 200)
      glEnd()
  
  pyglet.app.run()
  </code></pre>
  
  <p>I created a virtualenv like this in <strong>myenv</strong> directory:</p>
  
  <pre><code>virtualenv --no-site-packages myenv
  </code></pre>
  
  <p>And I started my virtualenv like this:</p>
  
  <pre><code>source myenv/bin/activate
  </code></pre>
  
  <p>The problem is that when I run my script I get this error:</p>
  
  <pre><code>dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
      Referenced from: /usr/local/bin/import
      Reason: image not found
  ./helloWorld3D.py: line 2: 32482 Trace/BPT trap: 5       import pyglet
  from: can't read /var/mail/pyglet.gl
  ./helloWorld3D.py: line 5: syntax error near unexpected token `('
  ./helloWorld3D.py: line 5: `win = pyglet.window.Window()'
  </code></pre>
  
  <p>But I previously installed 'pyglet' with 'pip' in my virtualenv like that:</p>
  
  <pre><code>sudo pip install pyglet
  </code></pre>
  
  <p>When I type 'pip list' in my virtualenv I get:</p>
  
  <pre><code>pip (1.5.6)
  pyglet (1.1.4)
  setuptools (3.6)
  wsgiref (0.1.2)
  </code></pre>
  
  <p>And when I type 'yolk -l' in my virtualenv I get:</p>
  
  <pre><code>PyRSS2Gen       - 1.0.0        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  Python          - 2.7.5        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload)
  Twisted         - 12.2.0       - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  altgraph        - 0.10.1       - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  bdist-mpkg      - 0.4.4        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  bonjour-py      - 0.3          - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  macholib        - 1.5          - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  matplotlib      - 1.1.1        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  modulegraph     - 0.10.1       - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  numpy           - 1.6.2        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  py2app          - 0.7.1        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  pyOpenSSL       - 0.13         - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  
  pyobjc-core     - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-AddressBook - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-AppleScriptKit - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-AppleScriptObjC - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-Automator - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-CFNetwork - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-Cocoa - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-Collaboration - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-CoreData - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-CoreLocation - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-CoreText - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-DictionaryServices - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-ExceptionHandling - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-FSEvents - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-InputMethodKit - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-InstallerPlugins - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-InstantMessage - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-InterfaceBuilderKit - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-LatentSemanticMapping - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-LaunchServices - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-Message - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-OpenDirectory - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-PreferencePanes - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-PubSub - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-QTKit - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-Quartz - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-ScreenSaver - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-ScriptingBridge - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-SearchKit - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-ServiceManagement - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-SyncServices - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-SystemConfiguration - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-WebKit - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  pyobjc-framework-XgridFoundation - 2.3.2a0      - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC)
  python-dateutil - 1.5          - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  pytz            - 2012d        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  scipy           - 0.11.0       - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  setuptools      - 0.6c12dev-r88846 - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  vboxapi         - 1.0          - active
  virtualenv      - 1.11.6       - active
  wsgiref         - 0.1.2        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7)
  xattr           - 0.6.4        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  yolk            - 0.4.3        - active
  zope.interface  - 3.8.0        - active development (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python)
  </code></pre>
  
  <p>So it seems that PyGlet is present with 'Pip' but not with 'yolk'....
  Can somebody help me?</p>