2

I need to use python-2.7 for some script, setuptools==39.1.0, I cannot pip install dm-sonnet, is there supposed to be find_namespace_packages inside setuptools? Its not there in this setuptools(or v44) Error message:

ERROR: Command errored out with exit status 1:
         command: /home/russo/anaconda3/envs/russo2/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9l072x/dm-sonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9l072x/dm-sonnet/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 /tmp/pip-install-9l072x/dm-sonnet/pip-egg-info
             cwd: /tmp/pip-install-9l072x/dm-sonnet/
        Complete output (5 lines):
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-9l072x/dm-sonnet/setup.py", line 7, in <module>
            from setuptools import find_namespace_packages
        ImportError: cannot import name find_namespace_packages
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
einharjer
  • 23
  • 1
  • 5
  • https://stackoverflow.com/questions/61063676/command-errored-out-with-exit-status-1-python-setup-py-egg-info-check-the-logs . In my question about this the answer did not help me but maybe it will help you – Thomas Apr 08 '20 at 13:22
  • Is there a way to download from pip or use Python3 – Jack Adee Apr 08 '20 at 13:34
  • @JackAdee I used pip to install, and I need to use python2.7 for some particular scripts – einharjer Apr 08 '20 at 13:40

1 Answers1

3

dm-sonnet requires Python 3. You cannot use it with Python 2.

In the commit 00612ca setup.py uses find_packages. You can try this version with Python 2.7. It's perhaps release 1.36 or earlier. Try

pip2 install dm-sonnet==1.36

or

pip2 install 'dm-sonnet<2'
phd
  • 82,685
  • 13
  • 120
  • 165