Have you ever had a situation where you tried to install a python library with ‘pip install’ and it didn’t work out of the box? Well that happenned to me today. Woohoo.
I was try to get PySide to work with:
sudo pip install -U PySide
Of course it didn’t. I got a error message about qtmake not being found, even though I installed it before with mac ports. So instead I opted to install PySide with mac ports, specifically:
sudo port install py27-pyside
The installation finished successfully, but after that PySide still didn’t work well. This was because the mac ports installation library was not added in the Python Path.
Default Pip installation library:
Default Macports installation library:
So the most basic way to get a python script that uses PySide is to add the following in the top of the file:
Other related links:
- port contents <port_name> to see where port is installed