Forum Stats

  • 3,769,989 Users
  • 2,253,043 Discussions
  • 7,875,261 Comments

Discussions

How to install python pip for python 2.6.6 in oracle linux6

HardikGupta
HardikGupta Member Posts: 45
edited Dec 21, 2016 12:33PM in Python

I am trying to install pip in my python 2.6.6, I have Oracle Linux 6

I followed the answers given at this link http://stackoverflow.com/questions/24294467/how-to-install-pip-for-python-2-6

I downloaded get-pip.py file and ran the following command

sudo python2.6 get-pip.py

However I get the following error

[[email protected] Downloads]# sudo python2.6 get-pip.py

DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6

Collecting pip

  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x3cad210>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/

  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x3cadad0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/

  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x3cad6d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/

  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x3cad790>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/

  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x3cad110>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/

  Could not find a version that satisfies the requirement pip (from versions: )

No matching distribution found for pip

The error shows some network issue, but I have full open internet access here.

How can I install pip?

I also tried yum, yum install python-pip but it gave the following message

[[email protected] ~]# yum install python-pip

Loaded plugins: refresh-packagekit, security, ulninfo

Setting up Install Process

No package python-pip available.

Error: Nothing to do

Answers

  • Anthony Tuininga-Oracle
    Anthony Tuininga-Oracle Member Posts: 37 Employee
    edited Dec 21, 2016 12:33PM

    I just tried this on my own copy of Oracle Linux 6. It worked but I received the following warnings:

    DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6

    Collecting pip

    /tmp/tmpmG9jg7/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.

    /tmp/tmpmG9jg7/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.

    In addition, installing pip and using it to install packages may result in the older packages used on OL6 to be overwritten -- which may in turn cause your system to become unstable. That and the potential security risks of using old, unpatched software means that I would strongly recommend downloading and using a newer version of Python on your OL6 installation. That way it will not interfere with the system Python and you can be sure you are using software (both Python itself and various extension modules like SSL) that has been patched for security flaws discovered over the past 6+ years! You can use Python 2.7 if you wish to remain with Python 2.x or you can download and install Python 3.5. Both of those will already have pip included in them as it is now a standard module. If you need help with this process, let me know! Thanks.

This discussion has been closed.