Install Python Packages
Last modified by Thomas Mortagne on 2026/10/10 10:42
Steps
Install a Python 3 package published on PyPI so that the scripts of the Python 3 Macro can import it, as explained in Python. Only some packages can be installed, see PyPI Repository Limitations.
- Install the Python 3 PyPI Repository and Python 3 Macro extensions, if they are not installed yet.
- Go to the "Extensions" section of the wiki administration.
- 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.
- 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.
- Review the dependencies listed and click "Continue".
- Check that a 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.