Index de l'article

Install a third-party Python module in QGIS

You will have to go through the OSGeo4W shell.

We will use Pip, but Pip is already in the Python of QGIS.

Follow this tutorial to install a module on the version of Python used by your QGIS on Windows, or more simply just below.

In the OSGeo shell (and not in the usual Windows shell), with some old QGIS version, maybe start to target the environment:

py3_env

On more recent versions (QGIS 3.34 for example), just enter:

python -m pip install wikipedia

If you have some users rights restrictions:

python -m pip install wikipedia --user

You may need to restart QGIS to take your new library into account (no need with the Wikipedia lib, but it depends of the library).

Maybe you will need to register Pip or Python in your Path System Variable, just follow the instructions from the OSGeo shell.

Other libraries examples

pip install requests-html
py -m pip install requests-html
pip install wikidata
pip install requests

PIP on Windows

But maybe you would install Pip on Windows. Pip is a Python extensions installer, check this: