How To: Install/Uninstall Python Packages without command prompt or with the built in installPackages method
This article will review how to install and uninstall Python packages without using the command prompt or the built in installPackages method. This method will also provide better messages if something does error out.
Note that if you want to know how to install/uninstall with either one of the other methods please find articles here:
Prerequisites
Procedure to Install Packages
-
In the Python tool create a new cell.
-
To install from pypi.org rather than a file use this command
-
!pip install <package name>
-
To install from a file such as a tar.gz or whl file use this command
-
!pip install “<file location>”
-
To install from a text file that is a requirements file
-
!pip install -r “<file location>”
Procedure to Uninstall Packages
-
In the Python tool create a new cell.
-
To install from pypi.org rather than a file use this command
-
!pip uninstall -y <package name>