agisoft-llc / metashape-scripts

Python scripts for Metashape (former PhotoScan)
MIT License
367 stars 203 forks source link

Can't load script, "ImportError: No module named 'PySide2' #16

Closed ahalota closed 4 years ago

ahalota commented 4 years ago

I can't load split_in_chunks_dialog.py on one of my installs of Metashape.

2020-01-28 11:22:09     from PySide2 import QtGui, QtCore, QtWidgets
2020-01-28 11:22:09 ImportError: No module named 'PySide2'
2020-01-28 11:22:09 Error: No module named 'PySide2'

It seems the python install doesn't have PySide2 library available, but where should it be installed?

This is if I load the script in via the Console in Metashape 1.5.1

PolarNick239 commented 4 years ago

Hi,

PySide2 package bundled with Metashape installation, but it seems that something gone wrong and this package was broken.

1) Have you installed any additional packages in bundled Python? 2) Please execute pip freeze from bundled python and provide me output (to run bundled pip do like described here, but instead of pip install python_module_name use pip freeze). 3) Make clean install: uninstall Metashape, manually delete whole Metashape folder - Program Files/Agisoft/Metashape Pro, install Metashape again (if you need 1.5.1 version - just change number in URL). 4) Try again. If it still doesn't work - please do step 2 again and provide me both pip freeze outputs.

PolarNick239 commented 4 years ago

Please feel free to reopen issue if you still have the problem.

ahalota commented 4 years ago

Oh! I did make some additions to the install of python, I'd forgotten that I did that. I switched to a clean install of 1.6.1. and it worked

PolarNick239 commented 4 years ago

Nice! :)