The stand-alone Metashape Python module allows to integrate Metashape functionality to the custom scripts without a need of full application installation.
First, ensure that you have Python 3.5, 3.6, 3.7 or 3.8 installed on your system. After that download the .whl package from the following page:
Downloads - https://www.agisoft.com/downloads/installer/
Then install Metashape module as a regular wheel package. The procedure may be slightly different depending on the OS used:
on Windows (64-bit)
python3.exe -m pip install Metashape-1.8.4-cp35.cp36.cp37.cp38-none-win_amd64.whl
python3 -m pip install Metashape-1.8.4-cp35.cp36.cp37.cp38-abi3-linux_x86_64.whl
python3 -m pip install Metashape-1.8.4-cp35.cp36.cp37.cp38-abi3-macosx_11_0_universal2.macosx_10_13_x86_64.whl
After installing stand-alone module, make sure that Metashape Pro application is activated on the same computer, where the module is supposed to be used. Alternatively, use the following command in Python IDLE console for the product activation, using your license key as an argument instead of the mock key in the example below):
The license file (.lic) should be put in the module directory, alternatively, the path to the license file can be defined by setting up agisoft_LICENSE environment variable.
In order to activate Metashape Python module in offline mode, an activation request should be created using the following approach:
request = Metashape.License().activateOffline("AAAAA-BBBBB-CCCCC-DDDDD-EEEEE")
with open(path, "wt") as file:
Created request file (usually should have .act extension) should be sent to firstname.lastname@example.org for manual activation. Agisoft support team will send back valid license file based on the provided request file.