Forum

Author Topic: Detect Objects - Failed to install script dependencies  (Read 48162 times)

Costas

  • Jr. Member
  • **
  • Posts: 90
  • Aerial Mapping
    • View Profile
Detect Objects - Failed to install script dependencies
« on: February 17, 2026, 01:16:50 PM »
Hello all.

I used to have the "Detect Objects" script (from https://github.com/agisoft-llc/metashape-scripts) and was working fine in Metashape v.2.1

I updated Metashape to the latest version v.2.3 today. I downloaded all scripts i needed from Github. All working fine but the "Detect Scripts" cannot install dependencies.

When i start Metashape i get a message to install dependencies. (pic1)

1) If i run the installation i get the error "Failed to install script dependencies"
and the message in console is (full console message attached as html:

Code: [Select]
2026-02-17 12:05:16 Agisoft Metashape Professional Version: 2.3.0 build 21954 (64 bit)
2026-02-17 12:05:16 Platform: Windows
2026-02-17 12:05:16 CPU: AMD Ryzen 7 2700X Eight-Core Processor (desktop)
2026-02-17 12:05:16 CPU family: 23 model: 8 signature: 800F82h
2026-02-17 12:05:16 RAM: 63.9 GB
2026-02-17 12:05:16 OpenGL Vendor: NVIDIA Corporation
2026-02-17 12:05:16 OpenGL Renderer: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2
2026-02-17 12:05:16 OpenGL Version: 4.6.0 NVIDIA 576.52
2026-02-17 12:05:16 Maximum Texture Size: 32768
2026-02-17 12:05:16 Quad Buffered Stereo: not enabled
2026-02-17 12:05:20 Installing "detect_objects" requirements...
...
...
..
2026-02-17 12:06:15
2026-02-17 12:06:15 [notice] A new release of pip is available: 23.3.2 -> 26.0.1
2026-02-17 12:06:15 [notice] To update, run: C:\Program Files\Agisoft\Metashape Pro\python\python.exe -m pip install --upgrade pip
2026-02-17 12:06:15 error: invalid-installed-package
2026-02-17 12:06:15
2026-02-17 12:06:15 Cannot process installed package pytorch-lightning 1.5.10 in 'c:\\program files\\agisoft\\metashape pro\\python\\lib\\site-packages' because it has an invalid requirement:
2026-02-17 12:06:15 .* suffix can only be used with `==` or `!=` operators
2026-02-17 12:06:15     torch (>=1.7.*)
2026-02-17 12:06:15            ~~~~~~^
2026-02-17 12:06:15
2026-02-17 12:06:15 Starting with pip 24.1, packages with invalid requirements can not be processed.
2026-02-17 12:06:15
2026-02-17 12:06:15 hint: To proceed this package must be uninstalled.
2026-02-17 12:06:33 Traceback (most recent call last):
2026-02-17 12:06:33   File "C:/Users/ITG/AppData/Local/Agisoft/Metashape Pro/scripts/detect_objects.py", line 153, in <module>
2026-02-17 12:06:33     pip_install(requirements_txt)
2026-02-17 12:06:33   File "C:\Program Files\Agisoft\Metashape Pro\modules\pip_auto_install.py", line 373, in pip_install
2026-02-17 12:06:33     raise Exception("Failed to install requirements")
2026-02-17 12:06:33 Exception: Failed to install requirements
...
...

In [1]:

Please help! I cannot figure out how to install dependencies correctly.


« Last Edit: February 17, 2026, 01:21:13 PM by Costas »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15660
    • View Profile
Re: Detect Objects - Failed to install script dependencies
« Reply #1 on: February 26, 2026, 07:18:23 PM »
Hello Costas,

We have updated the list of dependencies for the script, please check, if you are able to use it now:
https://github.com/agisoft-llc/metashape-scripts/blob/master/src/detect_objects.py
Best regards,
Alexey Pasumansky,
Agisoft LLC

Costas

  • Jr. Member
  • **
  • Posts: 90
  • Aerial Mapping
    • View Profile
Re: Detect Objects - Failed to install script dependencies
« Reply #2 on: February 27, 2026, 10:38:39 AM »
It seems that it installed all dependencies just fine (even if i got a lot of warnings).

In the following days i will test it (try to detect some objects) in a project to see that it runs correctly.
\Thank you!