Install, uninstall, and upgrade Python packages
IntelliJ IDEA provides methods for installing, uninstalling, and upgrading Python packages for a particular Python SDK. By default, IntelliJ IDEA uses pip to manage project packages. For Conda environments you can use the conda package manager.
In IntelliJ IDEA, you can preview and manage packages in the Python Packages tool window and in the Python interpreter Settings/Preferences.
Manage packages in the Python interpreter settings
To manage Python packages for the Python interpreter, navigate to SDKs under the Platform Settings section, and select the target Python SDK from the list of the available SDKs. Switch to the Packages tab to preview the list of the available packages.
, selectIf you select a Python SDK with the configured Conda environment, the Use Conda Package Manager toggle appears in the Packages tab toolbar.
Use this toggle to manage packages from the Conda environment repository. This toggle is enabled by default for Conda environments.
Install a package
Click the button on the package toolbar.
In the dialog that opens, preview the list of the available packages and type the name of the package to install in the Search field.
If required, select the following checkboxes:
Specify version: if this checkbox is selected, you can select the desired version from the list of available versions. By default, the latest version is taken.
Options: If this checkbox is selected, you can type the
pip install
command-line options in the text field.Install to user's site packages directory <path>: If this checkbox is left cleared (by default), then the packages will be installed into the current interpreter package directory. If the checkbox is selected, the packages will be installed into the specified directory. This option is not available for Conda environments.
Select the target package and click Install Package.
Uninstall a package
In the Packages tab , select the packages to be removed.
Click Uninstall (). The selected packages are removed from disk.
IntelliJ IDEA smartly tracks the status of packages and recognizes outdated versions by showing the number of the currently installed package version (column Version), and the latest available version (column Latest version). When a newer version of a package is detected, IntelliJ IDEA marks it with the arrow sign and suggests to upgrade it.
By default, the Latest version column shows only stable versions of the packages. If you want to extend the scope of the latest available versions to any pre-release versions (such as beta or release candidate), click Show early releases.
Upgrade a package
In the Packages tab , select the package to be upgraded.
Click Upgrade ().
The selected packages are upgraded to the latest available versions.
Click OK to complete upgrading.
If you're accustomed to installing packages from the commands line, you can proceed with your workflow using the Terminal.