Arch Linux

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!
Tasklist

FS#49923 - [python-pip] ImportError: cannot import name 'HTTPSHandler'

Attached to Project: Arch Linux
Opened by gregor (gregor) - Sunday, 03 July 2016, 10:11 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 04 July 2016, 00:47 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
pip gives the following error, the full output is at the end
--------
ImportError: cannot import name 'HTTPSHandler'
--------

Additional info:
* python-pip 8.1.2-1

Steps to reproduce:
* Install python-piop
* Run "pip"

Full Output:
------------
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
return ep.load()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2229, in load
return self.resolve()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2235, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.5/site-packages/pip/__init__.py", line 16, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python3.5/site-packages/pip/vcs/subversion.py", line 9, in <module>
from pip.index import Link
File "/usr/lib/python3.5/site-packages/pip/index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "/usr/lib/python3.5/site-packages/pip/wheel.py", line 39, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "/usr/lib/python3.5/site-packages/pip/_vendor/distlib/scripts.py", line 14, in <module>
from .compat import sysconfig, detect_encoding, ZipFile
File "/usr/lib/python3.5/site-packages/pip/_vendor/distlib/compat.py", line 66, in <module>
from urllib.request import (urlopen, urlretrieve, Request, url2pathname,
ImportError: cannot import name 'HTTPSHandler'
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 04 July 2016, 00:47 GMT
Reason for closing:  Not a bug
Comment by Doug Newgard (Scimmia) - Sunday, 03 July 2016, 13:26 GMT
If you run "python", then "import urllib.reqest" and "print( urllib.request.__file__)", what does it give you?
Comment by gregor (gregor) - Sunday, 03 July 2016, 14:03 GMT
It returns the following:
---------------
/usr/lib/python3.5/urllib/request.py
---------------
Comment by Doug Newgard (Scimmia) - Sunday, 03 July 2016, 15:16 GMT
Well that looks fine. Does "from urllib.request import HTTPSHandler" work at that python prompt?
Comment by gregor (gregor) - Sunday, 03 July 2016, 15:17 GMT
no:
------------
ImportError: cannot import name 'HTTPSHandler'
------------
Comment by Doug Newgard (Scimmia) - Sunday, 03 July 2016, 15:41 GMT
Strange. What python package do you have installed?
Comment by gregor (gregor) - Sunday, 03 July 2016, 15:44 GMT
A lot, please check the attachment :-)

pacman -Qs | grep -i python > installed_python_packages.log
Comment by Doug Newgard (Scimmia) - Sunday, 03 July 2016, 15:56 GMT
I was really just looking for the interpreter package, not all the the libs. Looks like you have python 3.5.1-2 from the Extra repo? Not self-built?

How about "import ssl" "print( ssl.__file__ )"?
Comment by gregor (gregor) - Sunday, 03 July 2016, 16:00 GMT
>>> import ssl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.5/ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: /usr/lib/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so: undefined symbol: SSLv3_method
Comment by Doug Newgard (Scimmia) - Sunday, 03 July 2016, 16:11 GMT
Make sure your entire system is up to date. This will include a new python package, as it was just moved to Extra a few hours ago. Also rebuild any AUR/local packages you have that my be linked to libssl.

This is very likely a partial update problem.
Comment by gregor (gregor) - Sunday, 03 July 2016, 20:16 GMT
Yes, it seems so. I installed now the latest updates and the problem are gone.
Thank you for your help.

Loading...