title: What is the simplest way to make matplotlib in OSX work in a virtual environment?
body: <p>I just discovered that <code>matplotlib</code> has issue with virtual environments. I tried the solutions in the <a href="http://matplotlib.org/faq/virtualenv_faq.html">FAQs</a> but they didn't work. An ideal solution should only involve <code>pip</code> commands, but it might be hard or unrealistic to request that. Anyway, I tried what they had on the OS X section to make a <code>framework</code> bash file in your <code>venv</code> folder and run command through it. </p>
  
  <pre><code>$ frameworkpython krls.py
  </code></pre>
  
  <p>when I did that I got a permission deniel error:</p>
  
  <pre><code>Permission denied
  </code></pre>
  
  <p>I am sort of scared of sudoing commands that I am not 100% what they do...anyway, it seemed the bash script isn't doing anything too dangerous so I went ahead and sudo-ed it. However, the response of my terminal was weird, it said:</p>
  
  <pre><code>sudo frameworkpython krsl.py
  sudo: frameworkpython: command not found
  </code></pre>
  
  <p>which means it doesn't recognize <code>frameworkpython</code> as a command. Without the sudo it says:</p>
  
  <p>frameworkpython krsl.py
  -bash: /Users/my_name/path/venv/bin/frameworkpython: Permission denied</p>
  
  <p>which seems it recognizes frameworkpython as a command (?) but it didn't  execute it due to permissions? It seems strange to me. Anyone any ideas?</p>
  
  <hr>
  
  <p>I also tried:</p>
  
  <pre><code>$ pip install TKAgg
  Collecting TKAgg
    Could not find a version that satisfies the requirement TKAgg (from versions: )
  No matching distribution found for TKAgg
  </code></pre>
  
  <p>but it didn't work. </p>
  
  <p>So I tried the next option which is using PySide which also didn't work and gave a giant error output:</p>
  
  <pre><code>$ pip install pyside
  Collecting pyside
    Using cached PySide-1.2.4.tar.gz
  Building wheels for collected packages: pyside
    Running setup.py bdist_wheel for pyside ... error
    Complete output from command /Users/my_name/path/venv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/pip-build-_yzDki/pyside/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/tmpUR9qFCpip-wheel- --python-tag cp27:
    Removing /private/var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/pip-build-_yzDki/pyside/pyside_package
    running bdist_wheel
    running build
    Python architecture is 64bit
    error: Failed to find cmake. Please specify the path to cmake with --cmake parameter.
  
    ----------------------------------------
    Failed building wheel for pyside
    Running setup.py clean for pyside
  Failed to build pyside
  Installing collected packages: pyside
    Running setup.py install for pyside ... error
      Complete output from command /Users/my_name/path/venv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/pip-build-_yzDki/pyside/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/pip-UVA_F4-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/my_name/path/venv/bin/../include/site/python2.7/pyside:
      Removing /private/var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/pip-build-_yzDki/pyside/pyside_package
      running install
      running build
      Python architecture is 64bit
      error: Failed to find cmake. Please specify the path to cmake with --cmake parameter.
  
      ----------------------------------------
  Command "/Users/my_name/path/venv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/pip-build-_yzDki/pyside/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/pip-UVA_F4-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/my_name/path/venv/bin/../include/site/python2.7/pyside" failed with error code 1 in /private/var/folders/nr/rxlk6w192hx8r74813yg6r500000gn/T/pip-build-_yzDki/pyside/
  </code></pre>
  
  <p>After that then I tried the next option using <a href="https://wiki.wxpython.org/ProjectPhoenix">WX Phonix</a>. Unfortunately, I went through their site and couldn't find how to do it. </p>