Forum

Author Topic: Metashape module not found  (Read 1646 times)

DocPopi

  • Newbie
  • *
  • Posts: 28
    • View Profile
Metashape module not found
« on: January 30, 2023, 05:26:37 PM »
Hi everyone!

So I developed a small batch + python script that allows to drag and drop an image folder on the batch script in order to launch Metashape headlessly and process the object until the 3d export. It used to work well a few months ago. Then I put the project aside, and installed windows 11 in between. Now, I realize that launching Metashape headlessly does not cause any problem when it is done from the Visual Code console. However, when I try to use my old script as it was intended to, that is to say drag and dropping a folder on top of a batch script, I have the message "Metashape module not found'.

I don't really understand what is going on: I have installed the latest API Metashape wheel, I have checked that there agisoft_LICENSE environment variable points to the Agisoft installation folder where my license is activated (I have a pro license, also, so that should work...). But nothing works, the Windows console still considers that 'Metashape module is not found".

Can anybody help me?

Thank you  :)

DocPopi

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Metashape module not found
« Reply #1 on: January 30, 2023, 07:29:48 PM »
Hi again, nevermind, I found the problem.

The problem was that I have two Python versions on my system. While my VS Code's Python interpreter is set to 3.8, the windows command console was set to Python 3.10 by default. I just had to go and add the Python 3.8 path to the system variables, and make sure it was on top of the list.

Now all works well :) For those who might struggle with this issue, this video allowed me to find the solution https://www.youtube.com/watch?v=ci8FvBSIl4Y

All the best :)

PS : I don't know whether there's a way to indicate a problem has been solved, sorry!