How to install python-gtk2, python-webkit and pyth

2019-04-08 02:48发布

问题:

I've read through many of the related questions but am still unclear how to do this as there are many software combinations available and many solutions seem outdated.

What is the best way to install the following on my virtual environment on OSX:

  • python-gtk2
  • python-webkit
  • python-jswebkit

Do I also have to install GTK+ and Webkit? If so, how?

Would also appreciate a simple explanation on how these pieces of software work together.

(I'm trying to use scrapyjs which requires these libraries)

回答1:

You should try using pip (A tool for installing and managing Python packages.) https://pypi.python.org/pypi/pip

You can install pip with easy_install:

sudo easy_install pip

After that you can install any package with a simple command:

sudo pip install PyGTK

for gtk2.