Setup a GPU instance in EC2 and can't install inference

So, I can’t pip install inference I get the following error. This is on a GPU Ubuntu box I created in AWS to test video processing.
Below is the response:
pip install inference
Defaulting to user installation because normal site-packages is not writeable
Collecting inference
Using cached inference-0.24.0-py3-none-any.whl.metadata (14 kB)
Collecting aiortc>=1.9.0 (from inference)
Using cached aiortc-1.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.5 kB)
Collecting APScheduler<=3.10.1 (from inference)
Using cached APScheduler-3.10.1-py3-none-any.whl.metadata (5.7 kB)
Collecting cython<=3.0.0 (from inference)
Using cached Cython-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.1 kB)
Collecting python-dotenv<=2.0.0 (from inference)
Using cached python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)
Collecting fastapi<0.111,>=0.100 (from inference)
Using cached fastapi-0.110.3-py3-none-any.whl.metadata (24 kB)
Collecting numpy<=1.26.4 (from inference)
Using cached numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Collecting opencv-python<=4.10.0.84,>=4.8.1.78 (from inference)
Using cached opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
Collecting piexif<=1.1.3 (from inference)
Using cached piexif-1.1.3-py2.py3-none-any.whl.metadata (3.7 kB)
Collecting pillow<11.0 (from inference)
Using cached pillow-10.4.0-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (9.2 kB)
Collecting prometheus-fastapi-instrumentator<=6.0.0 (from inference)
Using cached prometheus_fastapi_instrumentator-6.0.0-py3-none-any.whl.metadata (13 kB)
Requirement already satisfied: redis<6.0.0 in /usr/local/lib/python3.10/dist-packages (from inference) (5.2.0)
Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.10/dist-packages (from inference) (2.32.3)
Collecting rich<=13.5.2 (from inference)
Using cached rich-13.5.2-py3-none-any.whl.metadata (18 kB)
Collecting supervision<=0.22.0,>=0.21.0 (from inference)
Using cached supervision-0.22.0-py3-none-any.whl.metadata (13 kB)
Collecting pybase64<2.0.0 (from inference)
Using cached pybase64-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (8.1 kB)
Collecting scikit-image>=0.19.0 (from inference)
Using cached scikit_image-0.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (14 kB)
Requirement already satisfied: requests-toolbelt>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from inference) (1.0.0)
Requirement already satisfied: wheel>=0.38.1 in /usr/local/lib/python3.10/dist-packages (from inference) (0.44.0)
Collecting setuptools<=72.1.0,>=70.0.0 (from inference)
Using cached setuptools-72.1.0-py3-none-any.whl.metadata (6.6 kB)
Collecting pytest-asyncio<=0.21.1 (from inference)
Using cached pytest_asyncio-0.21.1-py3-none-any.whl.metadata (4.0 kB)
Collecting networkx>=3.1 (from inference)
Using cached networkx-3.4.2-py3-none-any.whl.metadata (6.3 kB)
Requirement already satisfied: pydantic~=2.6 in /usr/local/lib/python3.10/dist-packages (from inference) (2.9.2)
Collecting pydantic-settings~=2.2 (from inference)
Using cached pydantic_settings-2.6.0-py3-none-any.whl.metadata (3.5 kB)
Collecting openai>=1.12.0 (from inference)
Using cached openai-1.53.0-py3-none-any.whl.metadata (24 kB)
Collecting structlog>=24.1.0 (from inference)
Using cached structlog-24.4.0-py3-none-any.whl.metadata (7.3 kB)
Collecting zxing-cpp>=2.2.0 (from inference)
Using cached zxing_cpp-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.9 kB)
Collecting boto3<=1.34.123 (from inference)
Using cached boto3-1.34.123-py3-none-any.whl.metadata (6.6 kB)
Requirement already satisfied: typing-extensions>=4.8.0 in /usr/local/lib/python3.10/dist-packages (from inference) (4.12.2)
Collecting pydot>=2.0.0 (from inference)
Using cached pydot-3.0.2-py3-none-any.whl.metadata (10 kB)
Collecting shapely<2.1.0,>=2.0.0 (from inference)
Using cached shapely-2.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.0 kB)
Requirement already satisfied: tldextract~=5.1.2 in /usr/local/lib/python3.10/dist-packages (from inference) (5.1.2)
Collecting packaging~=24.0 (from inference)
Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting anthropic~=0.34.2 (from inference)
Using cached anthropic-0.34.2-py3-none-any.whl.metadata (18 kB)
Collecting pandas<2.3.0,>=2.0.0 (from inference)
Using cached pandas-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (89 kB)
Collecting onnxruntime~=1.15.1 (from inference)
Using cached onnxruntime-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.0 kB)
Collecting GPUtil==1.4.0 (from inference)
Using cached GPUtil-1.4.0.tar.gz (5.5 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [45 lines of output]
/usr/local/lib/python3.10/dist-packages/setuptools/dist.py:491: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!

          ********************************************************************************
          Usage of dash-separated 'description-file' will not be supported in future
          versions. Please use the underscore name 'description_file' instead.
  
          By 2025-Mar-03, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    opt = self.warn_dash_deprecation(opt, section)
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-ux26_oqz/gputil_8301f2478a3c46dab6b09b7ca72427ab/setup.py", line 3, in <module>
      setup(
    File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 183, in setup
      return run_commands(dist)
    File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 199, in run_commands
      dist.run_commands()
    File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 954, in run_commands
      self.run_command(cmd)
    File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 991, in run_command
      super().run_command(command)
    File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.10/dist-packages/setuptools/command/egg_info.py", line 315, in run
      self.find_sources()
    File "/usr/local/lib/python3.10/dist-packages/setuptools/command/egg_info.py", line 323, in find_sources
      mm.run()
    File "/usr/local/lib/python3.10/dist-packages/setuptools/command/egg_info.py", line 549, in run
      self.prune_file_list()
    File "/usr/local/lib/python3.10/dist-packages/setuptools/command/sdist.py", line 161, in prune_file_list
      super().prune_file_list()
    File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
      base_dir = self.distribution.get_fullname()
    File "/usr/local/lib/python3.10/dist-packages/setuptools/_core_metadata.py", line 267, in get_fullname
      return _distribution_fullname(self.get_name(), self.get_version())
    File "/usr/local/lib/python3.10/dist-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
      canonicalize_version(version, strip_trailing_zero=False),
  TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.