Вы находитесь на странице: 1из 2

HOW TO INSTALL, UPGRADE, OR UNISTALL PYTHON MODULE USING WINDOWS COMMAND PROMT

(CMD)

The first thing is to ensure that Python is installed in your windows device and also check if pip is
correctly installed. If you don’t have python installed in your system, go to the Python download site:
https://www.python.org/download . You can choose to install the latest version but for me I would
advise you to download the previous version before the latest one. Because mostly, the latest versions
have bugs. Then after the download, unzip the file (if it’s a zip file), select the path(if you want to change
the default path) then click continue or start button. Then wait for the download to finish and after
finishing, click the finish button. Then open the command prompt (CMD), you can type on the windows
search bar or press. Then the CMD will open (if not double click the CMD). Then type the pip command
“pip” and then click enter. Modules are just coding languages packages created for a specific task in
programming. For this tutorial we are going to use the module “pandas”. If you see the results like in
the image below, then you have installed python and the pip correctly. Otherwise, you have a problem
or an error.

INSTALLING: While the CMD is still opened, if the CMD is not opened follow the above steps to open the
CMD. Note the commands are written in lowercase. To install any python module all you need is three
things: the pip command + install command + module name. It would look like this, pip install module.
Substitute the word module with the name of the module you want to install. For example, pip install
pandas.

UPGRADING: Maybe the module you have is outdated i.e lacking certain features. Therefore, you might
want the lattest version of the module, because it might be much faster and has added cool features.
While the CMD is still opened, if the CMD is not opened follow the above steps to open the CMD. Note
the commands are written in lowercase and the module you want to upgrade must be already be
installed first, else you will get an error. To upgrade any python module all you need is four things: the
pip command + install command + minus minus upgrade command + module name . It would look like
this, pip install --upgrade module. Substitute the word module with the name of the module you want to
upgrade. The upgrade command is used to check the lattest version of the module, you can still use it
even if you are unsure about any changes in the module. For example, pip install --upgrade pandas.

UNINSTALLING: You might find some modules or python nuisance or even useless. Maybe because you
installed it to try out, it has a lot of bugs and errors that can’t go away even after upgrading the module.
The it would be best if the module is eliminated from your system and find another one working. To
install any python module all you need is three things: the pip command + uninstall command + module
name. It would look like this, pip uninstall module. Substitute the word module with the name of the
module you want to install. Note that while installing, you might see something like this, (y/n) . Type y
for yes, if you are very sure you want to uninstall the module, otherwise type n for no if you want to
terminate the uninstall module process. For example, pip uninstall pandas.
To check if you have installed the module correctly you can use the CMD, python shell or any working
python compiler installed in your system connected to you python packages files. To check on CMD, just
type the installation command. To check on the, python shell or python compiler, type the python code:

>>>import module

Subtitute the module with the name of the module. For example:

>>>import module

After typing the module code, press enter. If the cursor moves to the next line below the module code,
without auto typing itself some other codes, then this is a sign of successful installed module. If you find
there is an error, then check the error type and check reference to the error. You can try to fix the error,
consult the module creator or consult by posting a question about the module error in any python
community forums.

Оценить