I was trying to use Plugin Builder to create custom tool. When I set up parameters for plugin and press "generate", an error appear. Same situation in QGIS that was downloaded with OSGEO4W64.

enter image description here

I looked through some tutorials where it was said that I need to launch OSGeo4W.bat and run pb_tool. But this tool surprisingly not exist in OSGeo4W folder so i tried to test python3 -m install pb_tool and got another error:

enter image description here

Please let me know what can be done here. I simply want to build a button tool with functions I wrote and share it with another colleagues like a python addin in ArcGIS.

  • @user2856 I have python 2 installed with ArcGIS, but it is not set as an environment variable. And I typed the exact python 3 from osgeo4w, but it refers to the python 2 which is in the apps folder of osgeo4w. What I have to do? Feb 27 '19 at 5:23
  • @user2856 thanks, that works! However when I want to pack my plugin into a zipfile, after pb_tool zip it gives error that zip or 7z is missing. Does this tool needs to have something else installed for pb_tool? Feb 27 '19 at 10:16

In the osgeo4w cmd shell, call py3_env and qt5_env .

You'll also need to install 7zip .

  • I installed 7zip but error still exist. Do I have to install it in specific folder? Feb 27 '19 at 11:09
  • No, but you probably need to add the folder that contains 7z.exe to your PATH environment variable. set PATH=%PATH%;C:\Program Files\rest of path to 7z folder
    – user2856
    Feb 27 '19 at 11:14
  • fine, that works! Feb 27 '19 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.