1

i upgrade pip. But after the upgrade have some syntax error.

i try install python 3.x but not fixed.

Traceback (most recent call last):

File "/usr/bin/pip", line 7, in <module>
    from pip._internal import main
  File "/usr/lib/python2.6/site-packages/pip/_internal/__init__.py", line 19, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
  File "/usr/lib/python2.6/site-packages/pip/_vendor/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/usr/lib/python2.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 92
    _blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK}

I try to install pyopenssl

----------UPDATE----------------

i try to install python36u i got some errors

Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: liblzma.so.5(XZ_5.0)(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libgdbm_compat.so.4()(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libgdbm.so.4()(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: liblzma.so.5()(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libffi.so.6()(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libc.so.6(GLIBC_2.17)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Eren
  • 41
  • 5

3 Answers3

1

python2.6 is not supported anymore, try to change you SYS PATH to point for new python and pip

check this : Python ENV

alternatively you can use the following:

/path/to/pip3 install ....
/path/to/python3 <NAME_OF_THE_SCRIPT>
LinPy
  • 16,987
  • 4
  • 43
  • 57
  • i install python 3.x but default python version still 2.6. How can i change? Just i try to run https://github.com/narbehaj/ssl-checker – Eren May 15 '19 at 06:58
  • 1
    you need to set your PATH something like `export PATH="$PATH:/usr/local/bin/python"` that is depend where your python3 is installed you may found it out using `which python3` – LinPy May 15 '19 at 07:04
  • I update my answer for a workaround if you want to keep python2.6 the default for your system – LinPy May 15 '19 at 07:26
  • i won't keep python2.6 but now i got some errors try to python3. updated first question – Eren May 15 '19 at 07:34
1

Change your Default python version using this link Change default python version

you have installed pyopenssl for python2 environment. so first uninstall it.

check version: python3.6 -V, pip3 -V etc While installing pyopenssl or any software use pip3.

use sudo pip3 install pyopenssl or pip3 install pyopenssl, It will work.

griez007
  • 439
  • 1
  • 5
  • 11
  • i try install python 3 again but i got some errors. Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius) Requires: liblzma.so.5(XZ_5.0)(64bit) Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius) Requires: libgdbm_compat.so.4()(64bit) Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius) Requires: libgdbm.so.4()(64bit) Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius) Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit) – Eren May 15 '19 at 07:21
  • 1
    This is because of some dependency problem. don't uninstall python2 otherwise you need to reinstall the centOS again. if you did then the dependancy problem will not go anyway. https://linuxize.com/post/how-to-install-python-3-on-centos-7/ – griez007 May 15 '19 at 07:37
0

----------UPDATE----------------

i try to install python36u i got some errors

Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: liblzma.so.5(XZ_5.0)(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libgdbm_compat.so.4()(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libgdbm.so.4()(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: liblzma.so.5()(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libffi.so.6()(64bit)
Error: Package: python36u-libs-3.6.8-1.el7.ius.x86_64 (ius)
           Requires: libc.so.6(GLIBC_2.17)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Eren
  • 41
  • 5