9

We currently solving the problem of dependcies of our plugin. Since we want to have user-friendly installation (inexperienced users), one of the possible solution is drop some used packages in favour the ones that are built-in in QGIS 3 (on Windows).

That leads me to this question: Which are the packages? Is there any list of these packages that are bundled with QGIS installation on Windows?

3 Answers 3

7

You can also list the packages installed by QGIS installation after a fresh installation using pip on OSGeo Shell:

python -m pip list
7

One can try the following commands directly in the QGIS's Python Console to get more information regarding Python packages bundled with QGIS.

To list all Python modules:

help("modules")

To search for modules whose name or summary contain the string "xml", type this:

help("modules xml")

Enter any module name to get more help, e.g. "yaml".

help("yaml")

Note: that there are some drawbacks to this approach, including:

  • If there are a lot of installed packages, this method can take a long time to import each module before it can search that module’s path for sub-modules.
  • Python modules that have code outside of an if __name__ == "__main__": code block, and if user input is expected, may cause the code to enter an infinite loop or hang.
  • Module versions are not included
5

Not sure if a list exists but you could install it and generate one by noting all the .py files and folders located in the install \\Python\lib directory:

C:\Program Files\QGIS {version}\apps\Python{version}\lib
1
  • Thanks for the tip :)! I don't use any windows machine, but if there is no other option I will definitely try check this on some PC with windows. But I am afraid that is not so sustainable solution for me (for future developments, new versions of QGIS and so on)
    – Oto Kaláb
    Feb 12, 2019 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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