问题
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