A pip broke, possibly after another package upgrade.
root@host:/usr/local/bin# pip Traceback (most recent call last): File "/usr/local/bin/pip", line 9, in <module> load_entry_point('pip==7.1.0', 'console_scripts', 'pip')() File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 558, in load_entry_point File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2682, in load_entry_point File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2355, in load File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2361, in resolve ImportError: No module named 'pip' root@host:/usr/local/bin# which pip /usr/local/bin/pip root@host:/usr/local/bin# python -V Python 2.7.6 root@host:/usr/local/bin# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin* There was also a version installed via apt-get, deleted it, the problem remained.
I tried to install :
curl https://bootstrap.pypa.io/get-pip.py | sudo python % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1488k 100 1488k 0 0 1184k 0 0:00:01 0:00:01 --:--:-- 1184k The directory '/home/n.volynkin/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/n.volynkin/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. /tmp/tmptqUbcI/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.org/en/latest/security.html#snimissingwarning. /tmp/tmptqUbcI/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.org/en/latest/security.html#insecureplatformwarning. directory '/home/n.volynkin/.cache/pip/http' or its parent directory is not owned by the current user
Checked, all belong to me.
About SNI do not understand what the error.
Question: how to fix the installation or at least how to completely remove the already installed (and broken) pip? Where does pip come from in / usr / local / bin / pip?
#!/usr/bin/python3.4- Nick Volynkin ♦curl https://bootstrap.pypa.io/get-pip.py | sudo python3.4curl https://bootstrap.pypa.io/get-pip.py | sudo python3.4- Pavel Mayorov