How To Install Pip Linux – PIP is the Package Management System used to download and manage Python packages. there are thousands of packages that we can find in PyPI. Some kind of apt-get if we play on linux. This article simply discusses how to use PIP to download and install the packages we need for our program. For those of you who have been looking for How To Install Pip Linux, you can follow the tutorial below :
How To Install Pip Linux
• PIP installation
PIP is actually installed in Python version 2.7.9 and Python version 3. but if we use Python under this version we need to install it first.
• Install PIP under Windows
to install PIP, download the get-pip.py file first here. then enter with cmd where you have saved the download file for the get-pip.py file, then run the following command:
please note, if you haven’t installed setuptools then the above command will also download and install it in line with the PIP installation. wait until the process is complete.
• Installing PIP Under Linux
incidentally, here I use the Ubuntu 14.04 Operating System. to install PIP, follow the following command:
$ sudo apt-get install python-pip
wait until the process is complete.
• PIP basic commands
One of the main advantages of using PIP is that it’s easy to use commands to install Python packages.
• Package Installation Command
to install the package from PyPI we don’t need to download and install it manually and maybe that method for some people is troublesome. all we need is to open a Terminal or for Windows users to open CMD then type the command for installation and let PIP do everything. the basic syntax for downloading and installing the packages we need is:
$ pip install <nama-package>
the above command will download and install the latest package. we also install the package based on the package version we will use.
$ pip install <nama-package> == 2.0.1
or if we want to download and install the minimum package version from 2.0.1 we can use the command:
$ pip install ‘nama-package> = 2.0.1’
for example assume we will install pafy. type the following command:
$ pip install pafy
wait until the process is complete. if the installation process is complete we can test it by typing the command:
$ python -c “import pafy”
if there is no error, then the pafy installation via PIP is successful. but if the installation fails, an error will appear such as:
Traceback (most recent call last):
File “<string>”, line 1, in <module>
ImportError: No module named pafy
Using pip we can easily view Python packages or modules. There are thousands of packages that we can find on PyPI like apt-get if we play on Linux. For those who use python programming, the facilities provided by pip are very useful in downloading packages needed to create Python based applications. Because when we use or install Python not all packages or modules needed for a particular application require additional effort to add packages or modules in Python. Next, I share how to install PIP on Windows.
• The first step is to visit the web https://pip.pypa.io/en/stable/installing/ to download and see how to install PIP on Windows.
• Download get-pip.py on the web.
• Install the get-pip.py file by opening the file (open with) with Python.exe or by running it with the command prompt typing the command python get-pip.py that is run in the folder that contains the get-pip.py file .
• Then set PATH in the environmental variable to where pip.exe is located, here I use Python from ArcGIS so the location of the path is in C: \ Python27 \ ArcGIS10.3 \ Scripts. But if we manually install Python, the path is usually in C: \ Python27 \ Scripts. See the picture below
• To check the installation of pip, it is successful on our computer when the command pip id command prompt. In the picture below you can see the execution of the pip command.
So much information and also the How To Install Pip Linux tutorial that you can try. Hopefully this article can add to your insight and also help solve your problems on Linux. Thank you for reading and good luck guys!