scientific-paper-summarisation
scientific-paper-summarisation copied to clipboard
Issue with pip install -r requirements.txt
Hello,
I have tried to execute: 'pip install -r requirements.txt' The error is
Could not find a version that satisfies the requirement bonjour-py==0.3 (from -r requirements.txt (line 5)) (from versions: ) No matching distribution found for bonjour-py==0.3 (from -r requirements.txt (line 5))
How to proceed to fix it?
I installed it from here:
pip install https://opensource.apple.com/source/python_modules/python_modules-21/bonjour-py/bonjour-py-0.3.tar.gz
You may need to install swig
first: OS X:
brew install swig
or Linux:
sudo apt-get install swig
If you can a strange XCode warning, see here for the solution: https://github.com/nodejs/node-gyp/issues/569
On Ubuntu I got an error about a missing dns_sd.h
file when installing bonjour, but this was fixed with
sudo apt-get install libavahi-compat-libdnssd-dev
(see https://stackoverflow.com/questions/19585117/error-dns-sd-h-no-such-file-or-directory)
Hmm, seems this project needs more work to run on Linux, as it seems OS X only at present:
You're not running on MacOS X, and don't use GNUstep
I don't know how to build PyObjC on such a platform.
Please read the ReadMe.
ObjC runtime not found
The original requirements.txt
is frozen at specific versions, but some of these seem to be incompatible with each other.
Here's a requirements.txt
that allowed me to install and run this project on Ubuntu, with all the OSX specific libraries removed:
altgraph
backports-abc
bdist-mpkg
beautifulsoup4
boto
breadability
bz2file
certifi
chardet
Cython
dill
docopt
funcsigs
gensim
joblib
lxml
macholib
matplotlib
mock
modulegraph
nltk
nose
numpy
pandas
pbr
protobuf
py2app
pyparsing
python-dateutil
pytz
requests
scikit-learn
scipy
singledispatch
six
smart-open
sumy
tensorflow
tornado
ujson
virtualenv
xattr
zope.interface
You will also need to modify the sys.path.insert
in each file that it occurs (change it to the current working directory) and also remove the Dev.
prefix before some import
statements.
Now to try and acquire the data ...
Thanks @philgooch
For potential readers passing by, I was able to correct the sys.path.insert
and Dev.
issues with the following one-liner:
find . -type f -exec sed -i 's+/Users/edcollins/Documents/CS/4thYearProject/Code+/path/to/current/working/directory+g' {} + && find . -type f -exec sed -i 's+from\ Dev\.+from\ +g' {} +
(Just in case it needs to be said, replace /path/to/current/working/directory
with your current working directory before running this command, escaping any special character with \
)
Then there was still one last line in ./Word2Vec/paper_word2vec.py
that needed to have the line from Dev import DataTools
changed to import DataTools
.
Now on to try out this project!