How to install PIP on OpenSUSE Leap 42.3
To install PIP on OpenSUSE Leap 42.3
Pip is a very powerful package management system used to install and manage software packages written in the Python programming language. In this tutorial, you will learn about the installation of PIP on OpenSUSE Leap 42.3. Two different methods of installation is covered in this article.
Installing PIP: Method 1
Since all the dependencies and required packages are pre-installed in your OpenSUSE Leap 42.3, you shall straightaway proceed with the installation of PIP. You can do that by triggering the following command.
linuxhelp:~ # zypper install python-pip Retrieving repository ' openSUSE-Leap-42.3-Update' metadata .......................................................................................................................[done] Building repository ' openSUSE-Leap-42.3-Update' cache ............................................................................................................................[done] Retrieving repository ' openSUSE-Leap-42.3-Update-Non-Oss' metadata ...............................................................................................................[done] Building repository ' openSUSE-Leap-42.3-Update-Non-Oss' cache ....................................................................................................................[done] Loading repository data... Reading installed packages... Resolving package dependencies... The following 2 NEW packages are going to be installed: python-pip python-setuptools 2 new packages to install. Overall download size: 1.5 MiB. Already cached: 0 B. After the operation, additional 6.8 MiB will be used. Continue? [y/n/...? shows all options] (y): y Retrieving package python-setuptools-18.0.1-6.4.noarch (1/2), 263.8 KiB ( 1.0 MiB unpacked) Retrieving: python-setuptools-18.0.1-6.4.noarch.rpm ..................................................................................................................[done (3.9 KiB/s)] Retrieving package python-pip-7.1.2-4.4.noarch (2/2), 1.3 MiB ( 5.8 MiB unpacked) Retrieving: python-pip-7.1.2-4.4.noarch.rpm ........................................................................................................................[done (317.1 KiB/s)] Checking for file conflicts: .....................................................................................................................................................[done] (1/2) Installing: python-setuptools-18.0.1-6.4.noarch ............................................................................................................................[done] (2/2) Installing: python-pip-7.1.2-4.4.noarch ....................................................................................................................................[done]
Once you have installed PIP, you need to install certain packages which can be done via PIP.
linuxhelp:~ # pip install -U pip setuptools
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |????????????????????????????????| 1.3MB 239kB/s
Collecting setuptools
Downloading setuptools-38.2.1-py2.py3-none-any.whl (489kB)
100% |????????????????????????????????| 491kB 354kB/s
Installing collected packages: pip, setuptools
Found existing installation: pip 7.1.2
Uninstalling pip-7.1.2:
Successfully uninstalled pip-7.1.2
Found existing installation: setuptools 18.3.2
Uninstalling setuptools-18.3.2:
Successfully uninstalled setuptools-18.3.2
Successfully installed pip-9.0.1 setuptools-38.2.1
Simple procedure, wasn' t it? You can also easily uninstall the PIP package from your system by simply running the following command.
linuxhelp:~ # pip uninstall pip setuptools Uninstalling pip-9.0.1: /usr/bin/pip /usr/bin/pip3 /usr/bin/pip3.4 /usr/lib/python3.4/site-packages/pip-9.0.1.dist-info/DESCRIPTION.rst /usr/lib/python3.4/site-packages/pip-9.0.1.dist-info/METADATA /usr/lib/python3.4/site-packages/pip-9.0.1.dist-info/RECORD /usr/lib/python3.4/site-packages/pip-9.0.1.dist-info/WHEEL /usr/lib/python3.4/site-packages/pip-9.0.1.dist-info/entry_points.txt /usr/lib/python3.4/site-packages/pip-9.0.1.dist-info/metadata.json. . . . . /usr/lib/python3.4/site-packages/setuptools/site-patch.py /usr/lib/python3.4/site-packages/setuptools/ssl_support.py /usr/lib/python3.4/site-packages/setuptools/unicode_utils.py /usr/lib/python3.4/site-packages/setuptools/version.py /usr/lib/python3.4/site-packages/setuptools/wheel.py /usr/lib/python3.4/site-packages/setuptools/windows_support.py Proceed (y/n)? y Successfully uninstalled setuptools-38.2.1
If you want check the version of your PIP application, you need to run the following command. It not only displays the version of ocPortal, but also all the options available under the pip command.
linuxhelp:~ # pip -V
pip 7.1.2 from /usr/lib/python3.4/site-packages (python 3.4)
linuxhelp:~ # pip --help
Usage:
pip < command> [options]
Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
--log < path> Path to a verbose appending log.
--proxy < proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--retries < retries> Maximum number of retries each connection should attempt (default 5 times).
--timeout < sec> Set the socket timeout (default 15 seconds).
--exists-action < action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host < hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert < path> Path to alternate CA bundle.
--client-cert < path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
--cache-dir < dir> Store the cache data in < dir> .
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don' t periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
Installing PIP : Method 2
You can also install PIP by another method, via curl command as given in the following command.
linuxhelp:~ # curl " https://bootstrap.pypa.io/get-pip.py" -o " get-pip.py"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1558k 100 1558k 0 0 791k 0 0:00:01 0:00:01 --:--:-- 790k
After that, you need to run the following command which gets PIP to your system.
linuxhelp:~ # python get-pip.py
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |????????????????????????????????| 1.3MB 465kB/s
Collecting setuptools
Downloading setuptools-38.2.1-py2.py3-none-any.whl (489kB)
100% |????????????????????????????????| 491kB 579kB/s
Collecting wheel
Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
100% |????????????????????????????????| 51kB 940kB/s
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-9.0.1 setuptools-38.2.1 wheel-0.30.0
Now, PIP is installed in your OpenSUSE 42.3. You shall follow any of the two steps for installing PIP on OpenSUSE 42.3.
Comments ( 0 )
No comments available