oduwsdl / archivenow

A Tool To Push Web Resources Into Web Archives
MIT License
403 stars 42 forks source link

ImportError: No module named pathlib #42

Open kalligator opened 4 years ago

kalligator commented 4 years ago

In Ubuntu 18.04 pip install archivenow ... Successfully installed Jinja2-2.11.1 MarkupSafe-1.1.1 Werkzeug-1.0.0 archivenow-2019.7.27.2.35.46 certifi-2019.11.28 chardet-3.0.4 click-7.1.1 flask-1.1.1 idna-2.9 itsdangerous-1.1.0 requests-2.23.0 urllib3-1.25.8 I tried running a test with archivenow --all https://nypost.com/ The response was:

Traceback (most recent call last):
  File "/home/myusername/.local/bin/archivenow", line 7, in <module>
    from archivenow.archivenow import args_parser
  File "/home/myusername/.local/lib/python2.7/site-packages/archivenow/archivenow.py", line 13, in <module>
    from pathlib import Path
ImportError: No module named pathlib
machawk1 commented 4 years ago

@kalligator pathlib is built into Python 3 but is not present by default in Python 2. Your trace shows that you are using Python 2.7.

@maturban You may want to specify that archivenow requires Python 3 or adapt the code (e.g., using six) to account for those that are trying to use the tool with Python 2.