Python Package Management:
A Python package or library is a collection of modules, functions and methods that
allows for a minimal use of code during development. There are several useful data
science packages for Python and we will work with a few of them in this course.
Installing a package is quite similar to the Jupyter installation you have just done. In
general packages are installed through package managers like conda and pip. Just
specifying the command conda install <package_name> in the Command Prompt and it
will install that package if it exists in conda’s repository. If not you can always use pip
install <package_name>, which is in fact the most famous and widely used package
management system for Python.
Let us go over an example and install NumPy package using conda. In Command Prompt:
●
conda install numpy will install the NumPy package in your environment
●
Use conda list command to verify the installation or to list all packages in
your environment
●
You can install a specific version of the package limited to your
environment by specifying the version number like conda install
numpy==1.18.1
● conda update numpy will update the NumPy package to the latest version
● Finally to uninstall the package, use the command conda remove numpy
As we are primarily using the conda package manager, use pip only as an
alternative, that is if a package is not found through one of the conda’s channels.