dose pip3 is backwards compatibility as pip2

Viewed 28

until now we install all python modules with pip2 on some server Linux RHEL machine

due some problems we notice that pip2 not works properly and we get the following errors ( when we run pip2 list or pip2 installed

example (down) , from pip2 list ( but the same when we are installing python module )

therefore we installed pip3 , and pip3 is fine and we can get pip3 list and also we can installe with pip3

so my question is that : can we use pip3 to installed all modules for python2 and python3 ?

dose pip3 backwards compatibility with pip2 ?

Traceback (most recent call last):
  File "/usr/bin/pip", line 11, in <module>
    load_entry_point('pip==20.1.1', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg/pip/_internal/cli/main.py", line 73, in main
    command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
  File "/usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg/pip/_internal/commands/__init__.py", line 104, in create_command
    module = importlib.import_module(module_path)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg/pip/_internal/commands/install.py", line 24, in <module>
    from pip._internal.cli.req_command import RequirementCommand, with_cleanup
  File "/usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg/pip/_internal/cli/req_command.py", line 16, in <module>
    from pip._internal.index.package_finder import PackageFinder
  File "/usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg/pip/_internal/index/package_finder.py", line 21, in <module>
    from pip._internal.index.collector import parse_links
  File "/usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg/pip/_internal/index/collector.py", line 14, in <module>
    from pip._vendor import html5lib, requests
  File "/usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg/pip/_vendor/requests/__init__.py", line 97, in <module>
    from pip._vendor.urllib3.contrib import pyopenssl
  File "/usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg/pip/_vendor/urllib3/contrib/pyopenssl.py", line 48, in <module>
    from cryptography.hazmat.backends.openssl import backend as openssl_backend
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 37, in <module>
    from cryptography.hazmat.backends.openssl.x509 import _Certificate
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/x509.py", line 24, in <module>
    class _Certificate(object):
  File "/usr/lib64/python2.7/site-packages/cryptography/utils.py", line 23, in register_decorator
    verify_interface(iface, klass)
  File "/usr/lib64/python2.7/site-packages/cryptography/utils.py", line 43, in verify_interface
    actual = inspect.getargspec(getattr(klass, method))
  File "/usr/lib64/python2.7/inspect.py", line 815, in getargspec
    raise TypeError('{!r} is not a Python function'.format(func))
TypeError: <method-wrapper '__ne__' of type object at 0x35dad00> is not a Python function

example with pip3 that works

pip3 list
Package    Version
---------- -------
pip        19.3.1
setuptools 41.6.0
0 Answers
Related