I'm trying to get started with the Ghost.py headless browser on a Mac. I installed Ghost.py and its dependencies using these links/commands:
- Qt 5.0.1 for Mac, has a GUI installer
- PySide 1.1.0, which requires
Qt Version >= 4.7.4, has a GUI installer sudo pip install Ghost.py
I launched Python, and confirmed that I can import PySide. However, when I do from ghost import Ghost, it fails to find PySide:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ghost/__init__.py", line 1, in <module> from ghost import Ghost File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ghost/ghost.py", line 28, in <module> raise Exception("Ghost.py requires PySide or PyQt") Exception: Ghost.py requires PySide or PyQt By doing import PySide; print PySide;, it appears that PySide is installed here on my system: /Library/Python/2.7/site-packages/PySide. So, appended the PYTHONPATH like this: export PYTHONPATH=$PYTHONPATH:/Library/Python/2.7/site-packages #for PySide.
However, Ghost.py still cannot find PySide.
How can I convince Ghost.py to find my installation of PySide?
Environment:
- Mac OS X 10.7.5
- Python 2.7
- Qt 5.0.1
- PySide 1.1.0