Python Import Error For Modules Installed With Homebrew
I've already installed PySide using homebrew, but I get an error when my scripts run things such as from PySide import QtWebKit When I try brew install pyside I get an error that
Solution 1:
I figured out the problem by reinstalling the homebrew installation of PySide.
When you install using homebrew, you get a warning that
For non-homebrew python (2.x), you need to amend your PYTHONPATH like so:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
Ran this and the module worked.
To make the change automatic rather than having to type the line each time I opened a new terminal console, I needed to add that line to my ./bash_profile file.
Post a Comment for "Python Import Error For Modules Installed With Homebrew"