ptwobrussell / Mining-the-Social-Web-2nd-Edition

The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
http://bit.ly/135dHfs
Other
2.9k stars 1.49k forks source link

An error occurred when using pip install boilerpipe to install python-boilerpipe #286

Open XueningQin opened 8 years ago

XueningQin commented 8 years ago
default
XueningQin commented 8 years ago

Does it need to install anything else before install the python-boilerpipe? I have installed the relatively new JDK

planetscape commented 8 years ago

The issue appears to be related to the shutdown of code.google.com. I solved it using a slight modification of the instructions here: Cannot run python setup.py #36

First, because of other issues, I statred with Rupert Rebentisch's fork.

I then commented out the lines installing boilerpipe in \deploy\cookbooks\mtsw2e\recipes\default.rb:

#python_pip "boilerpipe" do # version "1.2.0.0" #end

This enabled me to run vagrant up without issue.

Then I logged into the VM using PuTTY.

I did:

git clone https://github.com/misja/python-boilerpipe.git cd python-boilerpipe sudo python setup.py install

But setup.py presented another problem, the missing code.google.com link.

I then tried editing setup.py and replacing the link with that found at Cannot run python setup.py #36, but for some reason encountered the error: "tarfile.ReadError: not a gzip file".

Time for another approach. I used

wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/boilerpipe/boilerpipe-1.2.0-bin.tar.gz

to retrieve the archive,

tar xvfz boilerpipe-1.2.0-bin.tar.gz

to unzip and untar, and

cp boilerpipe-1.2.0/*.jar src/boilerpipe/data/

to copy the *.jar files to the location that setup.py expects.

I then used nano to edit setup.py and comment out the line:

#download_jars(datapath=DATAPATH)

With the modified setup.py saved, I was able to run it successfully.

The steps above completed, I was then able to access the IPython notebooks by pointing my browser to http://localhost:8888/

I do hope I haven't missed any steps, and that this helps someone else. :-)

tuxdna commented 7 years ago

@Sherleen This seems to have been resolved in latest code. Can you re-check / confirm ?

stateanomaly commented 7 years ago

The link has been fixed in the python-boilerpipe repo on GitHub. But it is still not fixed on pip. Following @planetscape's instructions worked for me, but the wget is no longer necessary.