0

How can I install derivatives of hachoir library like hachoir-core Or hachoir-metadata on GoogleColab? I tried this way !pip install hachoir-metadata but I got the error

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-8op487i8/hachoir-metadata/

ChrisM
  • 505
  • 6
  • 18
hdiz
  • 1,141
  • 2
  • 13
  • 27

1 Answers1

0

!pip2 install hachoir-metadata works fine for me, and https://pypi.org/project/hachoir-metadata/ says "Last released in 2010" suggesting the package is incompatible with Python 3. Try changing your notebook setting to Python 2.

Ami F
  • 2,202
  • 11
  • 19
  • I can't do that ! it should be an another way to compatible with python 3 setting – hdiz Feb 17 '19 at 13:14
  • `!pip3 install --no-clean hachoir-metadata` will leave the installation directory behind, and if you look in the `setup.py` file in there you'll see it is using python 2 syntax (e.g. `print >> sys.stderr`) that is invalid in python 3. If python 2 is not an option for you then I suggest you find a more modern library to accomplish your goals than `hachoir-metadata`. – Ami F Feb 17 '19 at 17:13
  • On the other hand, it looks like `!pip install hachoir3` does work and has a `hachoir.metadata` submodule; maybe that's what you want? (if it isn't, stating explicitly what you're trying to accomplish might be a faster path to getting useful advice) – Ami F Feb 17 '19 at 17:13