Cannot install insightface by python-cinder

Open
#129 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
compilers

Research direction

Start by reproducing pip install -U insightface in the stated nvcr.io/nvidia/pytorch:22.08-py3 container and inspect the Cython traceback, especially the mainpiece() failure while processing Python.h. The issue does not name a project file or test; done would require identifying whether this is a Cinder compatibility bug and documenting or correcting the supported installation path.

Written by the indexing model from the issue text.

Description

Hello
build python cinder version with nvcr.io/nvidia/pytorch:22.08-py3 container, then install insightface by pip in virtual environment. however, pip reports a error:

(cpython3.10-a3c6e07ed141-compat-2d3356be745c) root@SINIAN-01:/opt/insightface# python --version
Python 3.10.5+cinder

(cpython3.10-a3c6e07ed141-compat-2d3356be745c) root@SINIAN-01:/opt# pip install -U insightface
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting insightface
  Downloading insightface-0.7.3.tar.gz (439 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 439.5/439.5 kB 8.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      WARNING: pandoc not enabled
      Traceback (most recent call last):
        File "/opt/venv/cpython3.10-a3c6e07ed141-compat-2d3356be745c/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/venv/cpython3.10-a3c6e07ed141-compat-2d3356be745c/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/venv/cpython3.10-a3c6e07ed141-compat-2d3356be745c/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 75, in <module>
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1008, in cythonize
          ctx = Context.from_options(c_options)
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/Cython/Compiler/Main.py", line 100, in from_options
          return cls(options.include_path, options.compiler_directives,
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/Cython/Compiler/Main.py", line 80, in __init__
          self.cython_scope = CythonScope.create_cython_scope(self)
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/Cython/Compiler/CythonScope.py", line 154, in create_cython_scope
          return CythonScope(context)
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/Cython/Compiler/CythonScope.py", line 17, in __init__
          ModuleScope.__init__(self, u'cython', None, None)
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/Cython/Compiler/Symtab.py", line 1324, in __init__
          self.process_include(Code.IncludeCode("Python.h", initial=True))
        File "/tmp/pip-build-env-z9mcptwz/overlay/lib/python3.10/site-packages/Cython/Compiler/Symtab.py", line 1493, in process_include
          key = inc.mainpiece()
      TypeError: mainpiece() takes exactly one argument (1152921504606846977 given)
      [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.

Thanks for any help

Dominant language
Python
Stars
3.8k
Forks
139
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from facebookincubator/MetaPython

All issues in facebookincubator/MetaPython

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.