insightface icon indicating copy to clipboard operation
insightface copied to clipboard

Can not install with poetry v1.2.0

Open DavidMetaphysic opened this issue 3 years ago • 2 comments

Works fine:

docker run -it python:3.9 bash
pip install poetry==1.1.15
poetry init
poetry add insightface

Doesn't work:

docker run -it python:3.9 bash
pip install poetry==1.2.0
poetry init
poetry add insightface

It fails with this error:

Package operations: 39 installs, 0 updates, 0 removals

  • Installing numpy (1.23.2)
  • Installing joblib (1.1.0)
  • Installing pillow (9.2.0)
  • Installing pyparsing (3.0.9)
  • Installing scipy (1.6.1)
  • Installing threadpoolctl (3.1.0)
  • Installing imageio (2.21.2)
  • Installing networkx (2.8.6)
  • Installing opencv-python-headless (4.6.0.66)
  • Installing packaging (21.3)
  • Installing pywavelets (1.3.0)
  • Installing scikit-learn (1.1.2)
  • Installing six (1.16.0)
  • Installing tifffile (2022.8.12)
  • Installing tomli (2.0.1)
  • Installing typing-extensions (4.3.0)
  • Installing certifi (2022.6.15): Installing...
  • Installing charset-normalizer (2.1.1): Installing...
  • Installing cycler (0.11.0): Installing...
  • Installing fonttools (4.37.1): Downloading... 80%
  • Installing certifi (2022.6.15)
  • Installing charset-normalizer (2.1.1)
  • Installing cycler (0.11.0)
  • Installing fonttools (4.37.1)
  • Installing idna (3.3)
  • Installing kiwisolver (1.4.4)
  • Installing protobuf (3.20.1)
  • Installing python-dateutil (2.8.2)
  • Installing pyyaml (6.0)
  • Installing qudida (0.0.4)
  • Installing scikit-image (0.19.3)
  • Installing setuptools-scm (6.4.2)
  • Installing urllib3 (1.26.12)
  • Installing wcwidth (0.2.5)
  • Installing albumentations (1.2.1)
  • Installing cython (0.29.32)
  • Installing easydict (1.9)
  • Installing matplotlib (3.5.3)
  • Installing onnx (1.12.0)
  • Installing prettytable (3.4.0)
  • Installing requests (2.28.1)
  • Installing tqdm (4.64.0)
  • Installing insightface (0.6.2): Failed

  CalledProcessError

  Command '['/root/.cache/pypoetry/virtualenvs/-il7asoJj-py3.9/bin/python', '/usr/local/lib/python3.9/site-packages/virtualenv/seed/wheels/embed/pip-22.2.2-py3-none-any.whl/pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/root/.cache/pypoetry/virtualenvs/-il7asoJj-py3.9', '--no-deps', '/root/.cache/pypoetry/artifacts/55/27/59/47a73e5a3d4d9cfcd8e40a5378f1bcf1080dc5d72b8f0bc45162bb3270/insightface-0.6.2.tar.gz']' returned non-zero exit status 1.

  at /usr/local/lib/python3.9/subprocess.py:528 in run
       524│             # We don't call process.wait() as .__exit__ does that for us.
       525│             raise
       526│         retcode = process.poll()
       527│         if check and retcode:
    →  528│             raise CalledProcessError(retcode, process.args,
       529│                                      output=stdout, stderr=stderr)
       530│     return CompletedProcess(process.args, retcode, stdout, stderr)
       531│ 
       532│ 

The following error occurred when trying to handle this error:


  EnvCommandError

  Command ['/root/.cache/pypoetry/virtualenvs/-il7asoJj-py3.9/bin/python', '/usr/local/lib/python3.9/site-packages/virtualenv/seed/wheels/embed/pip-22.2.2-py3-none-any.whl/pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/root/.cache/pypoetry/virtualenvs/-il7asoJj-py3.9', '--no-deps', '/root/.cache/pypoetry/artifacts/55/27/59/47a73e5a3d4d9cfcd8e40a5378f1bcf1080dc5d72b8f0bc45162bb3270/insightface-0.6.2.tar.gz'] errored with the following return code 1, and output: 
  Processing /root/.cache/pypoetry/artifacts/55/27/59/47a73e5a3d4d9cfcd8e40a5378f1bcf1080dc5d72b8f0bc45162bb3270/insightface-0.6.2.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error
    
    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [17 lines of output]
        Traceback (most recent call last):
          File "/tmp/tmp_y82h47w_in_process.py", line 363, in <module>
            main()
          File "/tmp/tmp_y82h47w_in_process.py", line 345, in main
            json_out['return_val'] = hook(**hook_input['kwargs'])
          File "/tmp/tmp_y82h47w_in_process.py", line 130, in get_requires_for_build_wheel
            return hook(config_settings)
          File "/tmp/pip-build-env-xrx5mnt8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
            return self._get_build_requires(config_settings, requirements=['wheel'])
          File "/tmp/pip-build-env-xrx5mnt8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
            self.run_setup()
          File "/tmp/pip-build-env-xrx5mnt8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 482, in run_setup
            super(_BuildMetaLegacyBackend,
          File "/tmp/pip-build-env-xrx5mnt8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
            exec(code, locals())
          File "<string>", line 5, in <module>
        ModuleNotFoundError: No module named 'numpy'
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  

  at /usr/local/lib/python3.9/site-packages/poetry/utils/env.py:1473 in _run
      1469│                 output = subprocess.check_output(
      1470│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1471│                 )
      1472│         except CalledProcessError as e:
    → 1473│             raise EnvCommandError(e, input=input_)
      1474│ 
      1475│         return decode(output)
      1476│ 
      1477│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:


  PoetryException

  Failed to install /root/.cache/pypoetry/artifacts/55/27/59/47a73e5a3d4d9cfcd8e40a5378f1bcf1080dc5d72b8f0bc45162bb3270/insightface-0.6.2.tar.gz

  at /usr/local/lib/python3.9/site-packages/poetry/utils/pip.py:51 in pip_install
       47│ 
       48│     try:
       49│         return environment.run_pip(*args)
       50│     except EnvCommandError as e:
    →  51│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
       52│ 

DavidMetaphysic avatar Aug 31 '22 12:08 DavidMetaphysic

We would like to be able to use this with the newest poetry release because of significant improvements in dependency resolution time.

DavidMetaphysic avatar Aug 31 '22 12:08 DavidMetaphysic

I don't know much about poetry, :(

nttstar avatar Aug 31 '22 14:08 nttstar