bp-kelley / descriptastorus

Descriptor computation(chemistry) and (optional) storage for machine learning
Other
220 stars 62 forks source link

Installation not compatiable with Python 2 #12

Closed tsa87 closed 2 years ago

tsa87 commented 2 years ago
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting git+https://github.com/bp-kelley/descriptastorus
  Cloning https://github.com/bp-kelley/descriptastorus to /tmp/pip-req-build-Trc97p
  Running command git clone -q https://github.com/bp-kelley/descriptastorus /tmp/pip-req-build-Trc97p
    ERROR: Command errored out with exit status 1:
     command: /home/tsa87/anaconda3/envs/python2/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-Trc97p/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-Trc97p/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-req-build-Trc97p/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-Trc97p/setup.py", line 36
        print("Descriptastorus requires rkdit to function, this is not installable by pip", file=sys.stderr)
                                                                                                ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

print is not a function in Python 2.x, causing a syntax error. Using from __future__ import print_function could make the code compatible with both versions.

bp-kelley commented 2 years ago

Since the RDKit is also not compatible with Python 2 which itself has been deprecated for over a year, I expect this will be a futile exercise.