How to install python-gtk2, python-webkit and python-jswebkit on OSX

纵饮孤独 提交于 2019-12-06 02:49:56

问题


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.




回答2:


Don’t.

Instead, install Docker and run it as follows:

$ docker run -it -p 8050:8050 --rm scrapinghub/splash

Splash is available at 0.0.0.0 address at port 8050 (http).

That way you do not need to install anything else on your system, possibly risking conflicts with other software.

See the Splash OS X installation instructions for more information.



来源:https://stackoverflow.com/questions/19919985/how-to-install-python-gtk2-python-webkit-and-python-jswebkit-on-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!