ModuleNotFoundError: No module named 'PySide2' while trying to use poetry env

Question:

i’m trying to use slicereg (https://github.com/brainglobe/slicereg) for data registration.

after import code from github page and install poetry to run slicereg i keep getting the following error :

The virtual environment found in ~.condaenvssliceregenv seems to be broken.
Recreating virtualenv slicereg-6kSWvOuc-py3.8 in ~AppDataLocalpypoetryCachevirtualenvsslicereg-6kSWvOuc-py3.8
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "~.condaenvssliceregenvlibimportlib__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "~sliceregsliceregmain.py", line 3, in <module>
    from PySide2.QtWidgets import QApplication
ModuleNotFoundError: No module named 'PySide2'

Pyside2 is already installed in my env using pip.
Any advice on how to resolve this issue ?

Thx

Asked By: LSeu

||

Answers:

Seems to be an issue, poetry fails to recognize conda environments as valid

see more at https://github.com/python-poetry/poetry/issues/4566

Remain unresolved for the current release (1.1.12)

Update : https://github.com/python-poetry/poetry/issues/5907

Answered By: LSeu