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 File | Project Structure, select 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.
If 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.
macOS
Windows
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 installcommand-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.
warning
If you've got any or error messages, consult the Troubleshooting guide for a solution.
tip
IntelliJ IDEA provides a quick fix that automatically installs the package you’re trying to import: if, after the keyword import, you type a name of a package that is not currently available on your machine, a quick fix suggests to either ignore the unresolved reference, or download and install the missing 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.
tip
You can upgrade several packages at once. Hold Cmd (macOS) or Ctrl on (Unix or Windows), left-click to select several items in the list of packages, and then click Upgrade.
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.