Forum

Author Topic: Error on trying to install external package with Metashape Pro 1.8.3  (Read 1543 times)

ps10

  • Newbie
  • *
  • Posts: 7
    • View Profile
Hi,

I am trying to install numpy and a few other external packages with Metashape Pro 1.8.3. This is a script we have been using for a while and the installation step for Windows worked until now (previous version tested was likely Metashape 1.7.5)

"C:\Program Files\Agisoft\Metashape Pro\python\python.exe" -m pip install numpy

Error:
IimportError: cannot import name 'InvalidSchemeCombination' from 'pip._internal.exceptions' (C:\Program Files\Agisoft\Metashape Pro\python\lib\site-packages\pip\_internal\exceptions.py)

Please see attachment for Traceback.

Appreciate any help with resolving this.

Thanks


techwizmatt

  • Newbie
  • *
  • Posts: 1
    • View Profile
Personally I would not install Numpy into Metashape like that. Try installing it into your Pythons standard package library, then in your entry point Metashape script append numpy installation path to your the sys path.

TL;DR

1. I have packages I need installed - I run
Code: [Select]
pip install <package-name>
2. find the modules / dist-packages location.

3 Then at the very beginning of my python entry point I declare
Code: [Select]
sys.path.append('/usr/local/lib/python3.8/dist-packages')
4. I now have access to that module within my script.

I have not tested this on 1.8.3 but I recommend giving it a shot, good luck!