Install Python Packages

Last modified by superadmin on 2026/11/25 21:24

This documentation is about the Python 3 PyPI Repository extension.

Install & versions

Make a PyPI package importable by the Python 3 scripts of one wiki, or of every wiki of the farm.

Steps

Only some packages can be installed, see PyPI Repository Limitations.

  1. Install the Python 3 PyPI Repository and Python 3 Macro extensions, if they are not installed yet.
  2. Go to the "Extensions" section of the wiki administration.
  3. Type the name of the package in the search field, after clearing the "Indexed" check box if the package is not among the most downloaded ones.
  4. Click "Install" on the package to install it on the current wiki, or "Install on farm" from the main wiki to install it for all the wikis.
  5. Review the dependencies listed and click "Continue".
  6. Check that a Python 3 Macro script can import the package, here for the pygments package:
    {{python3}}
    import pygments
    print(pygments.__version__)
    {{/python3}}

    The page displays the version of the installed package.

FAQ

How do I install a package which the search does not find?

Use "Advanced search" with the name of the package as "Extension ID": searching without the "Indexed" check box is slow, since each result is resolved on PyPI.

Are the dependencies of the package installed?

Yes, the required dependencies are installed with it, but never the optional ones (extras).

Are the downloaded packages verified?

Yes, each downloaded wheel is checked against the SHA-256 published by PyPI.

Related

Get Connected