The standard Python package management system, pip, can be used within Maya's Python interpreter to install, search for, and query Python packages.
pip is called from the command line using mayapy, the Maya Python interpreter. It cannot be called from within the Maya Python script editor.
mayapy is located in C:\Program Files\Autodesk\Maya<VersionNumber>\bin on Windows, in /Applications/Autodesk/maya<VersionNumber>/Maya.app/Contents/bin on macOS, and /usr/autodesk/Maya<VersionNumber>/bin/ on Linux.
You can install packages to either the Maya site-packages directory or to your user space. You will need Administrator privileges on Windows, or super user privileges on macOS and Linux, to install packages in the Maya site-packages directory. If you do not have Administrator or super user privileges, or if you do not want to install packages in the Maya installation directory, you can also install packages in your user space using the --user flag.
| Platform | Installing in Maya's site-packages directory | Installing in user space |
|---|---|---|
| Linux | sudo ./mayapy -m pip install <flags> <package> | ./mayapy -m pip install <flags> --user <package> |
| macOS | sudo ./mayapy -m pip install <flags> <package> | ./mayapy -m pip install <flags> --user <package> |
| Windows |
mayapy -m pip install <flags> <package>
from an command window running as Administrator |
mayapy -m pip install <flags> --user <package> |
You will also need Administrator or super user privileges to uninstall a package from the Maya site-packages directory.
| Linux and macOS | sudo ./mayapy -m pip uninstall <package> |
| Windows | mayapy -m pip uninstall <package> |
pip helps you maintain your Maya Python packages. You can see a list of installed packages by running ./mayapy -m pip list on macOS and Linux, and mayapy -m pip list on Windows.
For the most up-to-date information about pip, see the pip user guide.