fhamborg / news-please

news-please - an integrated web crawler and information extractor for news that just works
Apache License 2.0
2.08k stars 428 forks source link

Version Conflict on 3.5 #47

Closed rbuchmueller closed 7 years ago

rbuchmueller commented 7 years ago

Hi again, I have tried running news-please on python 3.5 and Ubunutu 16.02 in the cli. A version conflict was raised. See stack trace below.

Cheers, Raphael

raphael@raphael-Latitude-E6330:~$ sudo news-please Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 635, in _build_master ws.require(requires) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 943, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 834, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (lxml 3.5.0 (/usr/lib/python3/dist-packages), Requirement.parse('lxml>=3.6.0'), {'newspaper3k'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/news-please", line 5, in from pkg_resources import load_entry_point File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2927, in @_call_aside File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2913, in _call_aside f(*args, **kwargs) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2940, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 637, in _build_master return cls._build_from_requirements(requires) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 650, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 834, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (lxml 3.5.0 (/usr/lib/python3/dist-packages), Requirement.parse('lxml>=3.6.0'), {'newspaper3k'})

fhamborg commented 7 years ago

Looks like you're running lxml already on your computer in v=3.5.0, but 3.6 is required. I could imagine that this is due to Ubuntu's (preinstalled) lxml version, that is usually a bit outdated (http://lxml.de/installation.html#where-to-get-it). One idea might be to uninstall the lxml using your package manager, e.g., sudo apt remove python3-lxml and then install the latest version using pip, i.e., sudo pip3 install -U lxml

rbuchmueller commented 7 years ago

yep that solved the issue.

Thank you very much, Raphael