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.
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.
Windows | C:\Program Files\Autodesk\Maya<VersionNumber>\bin |
macOS | /Applications/Autodesk/maya<VersionNumber>/Maya.app/Contents/bin |
Linux | /usr/autodesk/Maya<VersionNumber>/bin/ |
Pip will install packages to Maya's site-packages directory by default. You will need Administrator privileges on Windows, or super user privileges on macOS and Linux, to install packages in these directories.
If you do not have these privileges, or if you do not want to install packages in these directories, you can install packages in your user space using the --user flag, or you can install packages in the version-specific site-packages directory using the --target option.
The version-specific site-packages directories are created when you start Maya.
You do not need Administrator or super user privileges to install packages to the version-specific site-packages directories, and the packages in these directories will be prioritized over packages installed in the other locations.
Installing to Maya's default site-packages directory | mayapy -m pip install <flags> <package>
Must be run from a command window running as Administrator |
Installing to your user space | mayapy -m pip install <flags> --user <package> |
Installing to the version-specific directory | mayapy -m pip install <flags> <package> --target C:/Users/<username>/Documents/maya/<version>/scripts/site-packages |
Installing to Maya's default site-packages directory | sudo ./mayapy -m pip install <flags> <package> |
Installing to your user space | ./mayapy -m pip install <flags> --user <package> |
Installing to the version-specific directory | ./mayapy -m pip install <flags> <package> --target $HOME/Library/Preferences/Autodesk/maya/<version>/scripts/site-packages |
Installing to Maya's default site-packages directory | sudo ./mayapy -m pip install <flags> <package> |
Installing to your user space | ./mayapy -m pip install <flags> --user <package> |
Installing to the version-specific directory | ./mayapy -m pip install <flags> <package> --target $HOME/maya/<version>/scripts/site-packages |
Use pip uninstall <package> to delete a package from your user space:
Linux and macOS | ./mayapy -m pip uninstall <package> |
Windows | mayapy -m pip uninstall <package> |
If you installed to the Maya site-packages directory, you will need Administrator or super user privileges to uninstall the package:
Linux and macOS | sudo ./mayapy -m pip uninstall <package> |
Windows | mayapy -m pip uninstall <package> |
If you installed to the version-specific site-packages directory, you will need to manually delete the package from the version specific site-package directory: