sashs / filebytes

Library to read and edit files in the following formats: Executable and Linking Format (ELF), Portable Executable (PE), MachO and OAT (Android Runtime)
https://scoding.de/filebytes-introduction
BSD 3-Clause "New" or "Revised" License
126 stars 25 forks source link

Installation issues with pip #19

Closed TazWake closed 5 years ago

TazWake commented 5 years ago

I've been trying to install this for two days now and keep hitting errors.

When I try to install this via pip "pip install filebytes", I get the following error message:

ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-rjhyqG/filebytes/setup.py", line 15, in <module>
        version = extractMetaInfo((currentDir / "filebytes" / "__init__.py").read_text())["VERSION"]
    AttributeError: 'PosixPath' object has no attribute 'read_text'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-rjhyqG/filebytes/

I've tried updating setuptools etc, but it still doesnt work. I am not sure if this is a problem with pip or filebytes though.

sashs commented 5 years ago

Hi,

this issue only exists with python2. However, it is fixed in the master branch, but not uploaded to the pip server.

It is a dependency problem which comes with a pull request. The setup.py uses pathlib and pathlib for python2 does not support the method read_text.

TazWake commented 5 years ago

Thanks - it works when I pull the repo and install via setup.py, as you've said here.