How to install modules with PIP (and fix it when it fails)

ViscousPotential
Analytics Vidhya
Published in
3 min readJan 14, 2021

--

This is part of a series discussing everything required to get an all-encompassing grasp of the Python programming language in as short a time as possible. Whether you are a beginner or an expert, I intend for you to learn something new.

PIP is a powerful tool that everyone should know how to use. But everyone has also at some point been in the position where Python’s PIP has given them trouble and they have been lost as to how to proceed. I have picked up a number of methods of troubleshooting PIP that have been very successful for me.

How to use PIP

Installing modules to python is painfully easy. Simply open up your terminal:

  • Windows — Command Prompt (CMD)
  • MacOS — Terminal
  • Linux — Terminal (it depends…)

Now in your command line, type:

pip install (THE NAME OF THE MODULE)

Sometimes, in MacOS and Linux, you may need to instead type:

sudo pip install (THE NAME OF THE MODULE)

(This will not work in Windows no matter how hard you try.)

Now if none of that works, that means you have a problem. So let’s try and fix that.

--

--

Analytics Vidhya
Analytics Vidhya

Published in Analytics Vidhya

Analytics Vidhya is a community of Generative AI and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

ViscousPotential
ViscousPotential

Written by ViscousPotential

A developer and electronics enthusiast wanting to share his experiences