Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#58849 - [python-pip] SSLError pip._vendor.requests.exceptions
Attached to Project:
Arch Linux
Opened by Rugantio Costa (rugantio) - Sunday, 03 June 2018, 10:40 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 03 June 2018, 18:17 GMT
Opened by Rugantio Costa (rugantio) - Sunday, 03 June 2018, 10:40 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 03 June 2018, 18:17 GMT
|
DetailsDescription:
Pip package seems broken, whatever I try to do I get this: $ pip search lol Traceback (most recent call last): File "/usr/bin/pip", line 11, in <module> load_entry_point('pip==10.0.1', 'console_scripts', 'pip')() File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point return ep.load() File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load return self.resolve() File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3.6/site-packages/pip/_internal/__init__.py", line 42, in <module> from pip._internal import cmdoptions File "/usr/lib/python3.6/site-packages/pip/_internal/cmdoptions.py", line 16, in <module> from pip._internal.index import ( File "/usr/lib/python3.6/site-packages/pip/_internal/index.py", line 20, in <module> from pip._vendor.requests.exceptions import SSLError ModuleNotFoundError: No module named 'pip._vendor.requests.exceptions' Additional info: * package version(s) 10.0.1-1 |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Sunday, 03 June 2018, 18:17 GMT
Reason for closing: Not a bug
Additional comments about closing: Caused by conflicting pip install from using pip install --upgrade pip. Don't run pip as root.
Sunday, 03 June 2018, 18:17 GMT
Reason for closing: Not a bug
Additional comments about closing: Caused by conflicting pip install from using pip install --upgrade pip. Don't run pip as root.
from pip._vendor import html5lib, requests, six
is run only a couple lines before
from pip._vendor.requests.exceptions import SSLError
The first import clearly works fine, so it's correctly detecting requests, but then failing to get usable information from it???
What's the output of python -c 'import pip._vendor.requests; print(pip._vendor.requests.__file__)'
python -c 'import pip._vendor.requests; print(pip._vendor.requests.__file__)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'pip._vendor.requests' has no attribute '__file__'
Using grep I notice that the SSLError class is in a different dir (under urllib3), in fact I can import with:
from pip._vendor.requests.packages.urllib3.exceptions import SSLError
Maybe this can be the fix?
If it didn't exist, it should return a ModuleNotFound error, so clearly it thinks something is there... but apparently not the python-requests module!
I should've asked to see the output of
python -c 'import pip._vendor.requests; print(pip._vendor.requests)'
(This will show what it thinks the module is, which very often *is* a __file__ attribute, but not always...)
What does this report?
ls /usr/lib/python3.6/site-packages/pip/_vendor
The output of ls /usr/lib/python3.6/site-packages/pip/_vendor is:
certifi idna msgpack __pycache__ requests
chardet __init__.py pkg_resources.bak pytoml urllib3
... and my theory is confirmed. At least one person has a broken requests module that was never installed by pacman.
I guess you installed a version of pip outside of pacman, probably using pip install --upgrade pip, in order to get the updated version of pip before we finally released it into the repos.
You'll need to figure out how many untracked files you've got, which pacman does not know about, and remove them. A tool like https://aur.archlinux.org/packages/lostfiles will help you with this.
rm -r /usr/lib/python3.6/site-packages/pip
pacman -S python-pip --force