gluonts-hierarchical-ICML-2021 icon indicating copy to clipboard operation
gluonts-hierarchical-ICML-2021 copied to clipboard

21.3: Breaking editable installation with No module named pip error

Open kdgutier opened this issue 3 years ago • 0 comments

Expected behavior gluonts Package to be installed without problem

pip version 21.3

Python version 3.7.8

Obtaining file:///home/ubuntu/regional_pmm/gluonts_hierarchical_ICML_2021
  Installing build dependencies ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
  Build backend does not support editables, falling back to setup.py egg_info.
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ubuntu/anaconda3/envs/regional_pmm/bin/python3.7 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/ubuntu/regional_pmm/gluonts_hierarchical_ICML_2021/setup.py'"'"'; __file__='"'"'/home/ubuntu/regional_pmm/gluonts_hierarchical_ICML_2021/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ot79_ilh
       cwd: /home/ubuntu/regional_pmm/gluonts_hierarchical_ICML_2021/
  Complete output (34 lines):
  WARNING:root:Package 'sphinx' not found. You will not be able to build the docs.
  /home/ubuntu/anaconda3/envs/regional_pmm/bin/python3.7: No module named pip
  /tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/setuptools/dist.py:720: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
    % (opt, underscore_opt)
  Traceback (most recent call last):
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
      subprocess.check_call(cmd)
    File "/home/ubuntu/anaconda3/envs/regional_pmm/lib/python3.7/subprocess.py", line 363, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/home/ubuntu/anaconda3/envs/regional_pmm/bin/python3.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpaosmct7v', '--quiet', 'setuptools_scm>=3.3.3']' returned non-zero exit status 1.
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/ubuntu/regional_pmm/gluonts_hierarchical_ICML_2021/setup.py", line 266, in <module>
      setup(**setup_kwargs)
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 152, in setup
      _install_setup_requires(attrs)
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 809, in fetch_build_eggs
      replace_conflicting=True,
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/pkg_resources/__init__.py", line 768, in resolve
      replace_conflicting=replace_conflicting
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1051, in best_match
      return self.obtain(req, installer)
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1063, in obtain
      return installer(requirement)
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 877, in fetch_build_egg
      return fetch_build_egg(self, req)
    File "/tmp/pip-build-env-k4rpl_ne/overlay/lib/python3.7/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
      raise DistutilsError(str(e)) from e
  distutils.errors.DistutilsError: Command '['/home/ubuntu/anaconda3/envs/regional_pmm/bin/python3.7', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpaosmct7v', '--quiet', 'setuptools_scm>=3.3.3']' returned non-zero exit status 1.
  ----------------------------------------
WARNING: Discarding file:///home/ubuntu/regional_pmm/gluonts_hierarchical_ICML_2021. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

A temporal solution is found here https://github.com/pypa/pip/issues/10573 pip install -e . --no-use-pep517

kdgutier avatar Oct 21 '21 17:10 kdgutier