Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't load plugin 'deep-learning-datasets-maker' due to an error when calling its classFactory() method #7

Open
aldinorizaldy opened this issue Feb 1, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@aldinorizaldy
Copy link

Couldn't load plugin 'deep-learning-datasets-maker' due to an error when calling its classFactory() method

subprocess.CalledProcessError: Command '['python3', '-m', 'pip', 'install', 'Cython', 'scikit-image', 'Pillow', 'pycocotools']' returned non-zero exit status 1.
Traceback (most recent call last):
File "C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deep-learning-datasets-maker\utils\COCO\pycococreatortools\pycococreatortools.py", line 10, in
from pycocotools import mask
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'pycocotools'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deep-learning-datasets-maker_init_.py", line 35, in classFactory
from .split_rs_data import SplitRSData
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deep-learning-datasets-maker\split_rs_data.py", line 46, in
from .utils.COCO import clip_from_file, slice, from_mask_to_coco
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deep-learning-datasets-maker\utils\COCO_init
.py", line 1, in
from .shape_to_coco import clip_from_file, slice, from_mask_to_coco
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deep-learning-datasets-maker\utils\COCO\shape_to_coco.py", line 16, in
from .pycococreatortools import *
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deep-learning-datasets-maker\utils\COCO\pycococreatortools_init
.py", line 1, in
from .pycococreatortools import *
File "C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deep-learning-datasets-maker\utils\COCO\pycococreatortools\pycococreatortools.py", line 16, in
["python3", '-m', 'pip', 'install', 'Cython', 'scikit-image', 'Pillow', 'pycocotools'])
File "C:\PROGRA1\QGIS31.4\apps\Python37\lib\subprocess.py", line 328, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python3', '-m', 'pip', 'install', 'Cython', 'scikit-image', 'Pillow', 'pycocotools']' returned non-zero exit status 1.

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.4.13-Madeira Madeira, 567300ccf1

Python Path:
C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python
C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA1/QGIS31.4/apps/qgis-ltr/./python/plugins
C:\Users\pprt\matterport\models\research
C:\Users\pprt\matterport\models\research\slim
C:\Program Files\QGIS 3.4\bin\python37.zip
C:\PROGRA1\QGIS31.4\apps\Python37\DLLs
C:\PROGRA1\QGIS31.4\apps\Python37\lib
C:\Program Files\QGIS 3.4\bin
C:\Users\pprt\AppData\Roaming\Python\Python37\site-packages
C:\Users\pprt\AppData\Roaming\Python\Python37\site-packages\tf_unet-0.1.2-py3.7.egg
C:\PROGRA1\QGIS31.4\apps\Python37
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\win32
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA1\QGIS31.4\apps\Python37\lib\site-packages\Pythonwin
C:/Users/pprt/AppData/Roaming/QGIS/QGIS3\profiles\default/python

@Youssef-Harby
Copy link
Member

Youssef-Harby commented Feb 7, 2022

This issue is because library called "pycocotools" make sure you installed it in QGIS Python packages and let us know your feedback again, Thank You!

@aldinorizaldy
Copy link
Author

Well thank you for fast response!! I didn't realize that "pycocotools" library is not installed properly. The thing with pycocotools is I am using Windows 10, and pycocotools cannot be installed in Windows https://github.com/cocodataset/cocoapi/issues/169. I tried to install https://github.com/philferriere/cocoapi but it does not work either. Do you use Windows or Ubuntu?

@Youssef-Harby
Copy link
Member

Youssef-Harby commented Feb 10, 2022

try:

pip install setuptools Cython
pip install pycocotools

if you have errors, follow these links:
https://www.jianshu.com/p/8658cda3d553
https://www.programmerall.com/article/5226218575/
https://github.com/philferriere/cocoapi

the plugin was tested on Windows/Ubuntu/macos
you can try it online
Binder

@Youssef-Harby Youssef-Harby added the enhancement New feature or request label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants