Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash check if python package is installed

# Basic syntax:
pip list | grep packagename # or:
pip3 list | grep packagename
# Where:
#	- pip/pip3 list lists all installed Python packages (in the current env)
#	- grep packagename searches for the packagename in the list of packages
#		installes with pip/pip3

# Example usage:
pip list | grep numpy
numpy                              1.20.3
numpydoc                           1.1.0
 
PREVIOUS NEXT
Tagged: #bash #check #python #package #installed
ADD COMMENT
Topic
Name
9+7 =