facebookresearch / sapiens

High-resolution models for human tasks.
https://about.meta.com/realitylabs/codecavatars/sapiens/
Other
3.91k stars 200 forks source link

unable to pip install det #103

Open Gnoot01 opened 3 hours ago

Gnoot01 commented 3 hours ago

Hi, I ran 'pip install -e . -v' in the det folder, and received this error. As you can see, I have the torch module indeed

\sapiens\sapiens-main\det> pip install -e . -v
Using pip 24.2 from C:\Users\Andrew\Desktop\Dev Me\TKR_model\1 calf raise\sapiens\sapiens-main\pose\demo\.venv\lib\site-packages\pip (python 3.10)
Obtaining file:///C:/Users/Andrew/Desktop/Dev%20Me/TKR_model/1%20calf%20raise/sapiens/sapiens-main/det
  Running command pip subprocess to install build dependencies
  Using pip 24.2 from C:\Users\Andrew\Desktop\Dev Me\TKR_model\1 calf raise\sapiens\sapiens-main\pose\demo\.venv\Lib\site-packages\pip (python 3.10)
  Collecting setuptools>=40.8.0
    Obtaining dependency information for setuptools>=40.8.0 from https://files.pythonhosted.org/packages/ff/ae/f19306b5a221f6a436d8f2238d5b80925004093fa3edea59835b514d9057/setuptools-75.1.0-py3-none-any.whl.metadata
    Using cached setuptools-75.1.0-py3-none-any.whl.metadata (6.9 kB)
  Using cached setuptools-75.1.0-py3-none-any.whl (1.2 MB)
  Installing collected packages: setuptools
  Successfully installed setuptools-75.1.0
  Installing build dependencies ... done
  Running command Checking if build backend supports build_editable
  Checking if build backend supports build_editable ... done
  Running command Getting requirements to build editable
  Traceback (most recent call last):
    File "C:\Users\sapiens\sapiens-main\pose\demo\.venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Users\sapiens\sapiens-main\pose\demo\.venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\sapiens\sapiens-main\pose\demo\.venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 132, in get_requires_for_build_editable
      return hook(config_settings)
    File "C:\Users\AppData\Local\Temp\pip-build-env-x7qx0rvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 464, in get_requires_for_build_editable
      return self.get_requires_for_build_wheel(config_settings)
    File "C:\Users\AppData\Local\Temp\pip-build-env-x7qx0rvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
    File "C:\Users\AppData\Local\Temp\pip-build-env-x7qx0rvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
      self.run_setup()
    File "C:\Users\AppData\Local\Temp\pip-build-env-x7qx0rvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 503, in run_setup
      super().run_setup(setup_script=setup_script)
    File "C:\Users\AppData\Local\Temp\pip-build-env-x7qx0rvj\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
      exec(code, locals())
    File "<string>", line 17, in <module>
  ModuleNotFoundError: No module named 'torch'
  error: subprocess-exited-with-error

  × Getting requirements to build editable 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.
  full command: 'C:\Users\sapiens\

sapiens-main\pose\demo\.venv\Scripts\python.exe' 'C:\Users\sapiens\sapiens-main\pose\demo\.venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' get_requires_for_build_editable 'C:\Users\AppData\Local\Temp\tmpxfb2driq'
  cwd: C:\Users\sapiens\sapiens-main\det
  Getting requirements to build editable ... error
error: subprocess-exited-with-error

× Getting requirements to build editable 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.

a

Gnoot01 commented 3 hours ago

Commenting out the following for bounding box detection does not work either, as there are other code dependent on it

parser.add_argument('det_config', help='Config file for detection')
parser.add_argument('det_checkpoint', help='Checkpoint file for detection')
rawalkhirodkar commented 29 minutes ago

Please comment out both det-config and det-checkpoint in the shell.

In that case, it is initialized to its default value.

On the error during install, the log says torch not found. Did you install pytorch before moving to det?