Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #99256 > unrolled thread

pip does not work anymore

Started byCecil Westerhof <Cecil@decebal.nl>
First post2015-11-23 08:48 +0100
Last post2015-11-23 16:47 -0800
Articles 7 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  pip does not work anymore Cecil Westerhof <Cecil@decebal.nl> - 2015-11-23 08:48 +0100
    Re: pip does not work anymore Laura Creighton <lac@openend.se> - 2015-11-23 09:11 +0100
      Re: pip does not work anymore Cecil Westerhof <Cecil@decebal.nl> - 2015-11-23 10:33 +0100
    Re: pip does not work anymore Cecil Westerhof <Cecil@decebal.nl> - 2015-11-23 12:14 +0100
    Re: pip does not work anymore Steven D'Aprano <steve@pearwood.info> - 2015-11-24 00:08 +1100
      Re: pip does not work anymore Cecil Westerhof <Cecil@decebal.nl> - 2015-11-23 19:23 +0100
    Re: pip does not work anymore sohcahtoa82@gmail.com - 2015-11-23 16:47 -0800

#99256 — pip does not work anymore

FromCecil Westerhof <Cecil@decebal.nl>
Date2015-11-23 08:48 +0100
Subjectpip does not work anymore
Message-ID<87vb8trw9l.fsf@Equus.decebal.nl>
When I try to install something with pip2 I get:
    Traceback (most recent call last):
      File "/usr/bin/pip2", line 9, in <module>
        load_entry_point('pip==7.1.2', 'console_scripts', 'pip2')()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
        return get_distribution(dist).load_entry_point(group, name)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
        return ep.load()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
        return self.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 15, in <module>
        from pip.vcs import git, mercurial, subversion, bazaar  # noqa
      File "/usr/lib/python2.7/site-packages/pip/vcs/subversion.py", line 9, in <module>
        from pip.index import Link
      File "/usr/lib/python2.7/site-packages/pip/index.py", line 30, in <module>
        from pip.wheel import Wheel, wheel_ext
      File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 35, in <module>
        from pip._vendor.distlib.scripts import ScriptMaker
      File "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py", line 14, in <module>
        from .compat import sysconfig, detect_encoding, ZipFile
      File "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py", line 31, in <module>
        from urllib2 import (Request, urlopen, URLError, HTTPError,
    ImportError: cannot import name HTTPSHandler

With pip3 I get the same problem.

It looks like openSUSE has done an upgrade in which it disabled ssl2.
How can I get pip2/3 working again?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [next] | [standalone]


#99257

FromLaura Creighton <lac@openend.se>
Date2015-11-23 09:11 +0100
Message-ID<mailman.60.1448266316.2291.python-list@python.org>
In reply to#99256
In a message of Mon, 23 Nov 2015 08:48:54 +0100, Cecil Westerhof writes:
>When I try to install something with pip2 I get:
>    Traceback (most recent call last):
>      File "/usr/bin/pip2", line 9, in <module>
>        load_entry_point('pip==7.1.2', 'console_scripts', 'pip2')()
>      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
>        return get_distribution(dist).load_entry_point(group, name)
>      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
>        return ep.load()
>      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
>        return self.resolve()
>      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
>        module = __import__(self.module_name, fromlist=['__name__'], level=0)
>      File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 15, in <module>
>        from pip.vcs import git, mercurial, subversion, bazaar  # noqa
>      File "/usr/lib/python2.7/site-packages/pip/vcs/subversion.py", line 9, in <module>
>        from pip.index import Link
>      File "/usr/lib/python2.7/site-packages/pip/index.py", line 30, in <module>
>        from pip.wheel import Wheel, wheel_ext
>      File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 35, in <module>
>        from pip._vendor.distlib.scripts import ScriptMaker
>      File "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py", line 14, in <module>
>        from .compat import sysconfig, detect_encoding, ZipFile
>      File "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py", line 31, in <module>
>        from urllib2 import (Request, urlopen, URLError, HTTPError,
>    ImportError: cannot import name HTTPSHandler
>
>With pip3 I get the same problem.
>
>It looks like openSUSE has done an upgrade in which it disabled ssl2.
>How can I get pip2/3 working again?
>
>-- 
>Cecil Westerhof
>Senior Software Engineer
>LinkedIn: http://www.linkedin.com/in/cecilwesterhof
>-- 
>https://mail.python.org/mailman/listinfo/python-list

Reading https://forums.opensuse.org/showthread.php/488962-OpenSuse-python-amp-openssl
seems to indicatew that you are supposed to use python-pip and not pip
for OpenSuse, but I don't have one, so that is just my interpretation.

Laura

[toc] | [prev] | [next] | [standalone]


#99260

FromCecil Westerhof <Cecil@decebal.nl>
Date2015-11-23 10:33 +0100
Message-ID<87r3jhrrfl.fsf@Equus.decebal.nl>
In reply to#99257
On Monday 23 Nov 2015 09:11 CET, Laura Creighton wrote:

> In a message of Mon, 23 Nov 2015 08:48:54 +0100, Cecil Westerhof
> writes:
>> When I try to install something with pip2 I get: Traceback (most
>> recent call last): File "/usr/bin/pip2", line 9, in <module>
>> load_entry_point('pip==7.1.2', 'console_scripts', 'pip2')() File
>> "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line
>> 558, in load_entry_point return
>> get_distribution(dist).load_entry_point(group, name) File
>> "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line
>> 2682, in load_entry_point return ep.load() File
>> "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line
>> 2355, in load return self.resolve() File
>> "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line
>> 2361, in resolve module = __import__(self.module_name,
>> fromlist=['__name__'], level=0) File
>> "/usr/lib/python2.7/site-packages/pip/__init__.py", line 15, in
>> <module> from pip.vcs import git, mercurial, subversion, bazaar #
>> noqa File "/usr/lib/python2.7/site-packages/pip/vcs/subversion.py",
>> line 9, in <module> from pip.index import Link File
>> "/usr/lib/python2.7/site-packages/pip/index.py", line 30, in
>> <module> from pip.wheel import Wheel, wheel_ext File
>> "/usr/lib/python2.7/site-packages/pip/wheel.py", line 35, in
>> <module> from pip._vendor.distlib.scripts import ScriptMaker File
>> "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py",
>> line 14, in <module> from .compat import sysconfig,
>> detect_encoding, ZipFile File
>> "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py",
>> line 31, in <module> from urllib2 import (Request, urlopen,
>> URLError, HTTPError, ImportError: cannot import name HTTPSHandler
>>
>> With pip3 I get the same problem.
>>
>> It looks like openSUSE has done an upgrade in which it disabled
>> ssl2. How can I get pip2/3 working again?
>>
>
> Reading
> https://forums.opensuse.org/showthread.php/488962-OpenSuse-python-amp-openssl
> seems to indicatew that you are supposed to use python-pip and not
> pip for OpenSuse, but I don't have one, so that is just my
> interpretation.

python-pip is the package that you need to install to use pip2. I
removed it and then pip2 does not exist anymore. I reinstalled it, but
keep getting the same error. It looks like I need to install:
    https://docs.python.org/2/library/urllib2.html?highlight=urllib2#urllib2.HTTPSHandler
but I need pip2 to do that. So I need a working pip2 to get it
working. :'-(


By the way openSUSE did a big update and broke other things also. For
example virtualbox. Probably time to really leave openSUSE for Debian.
But that will not be painless.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [prev] | [next] | [standalone]


#99266

FromCecil Westerhof <Cecil@decebal.nl>
Date2015-11-23 12:14 +0100
Message-ID<8737vxrmrg.fsf@Equus.decebal.nl>
In reply to#99256
On Monday 23 Nov 2015 08:48 CET, Cecil Westerhof wrote:

> When I try to install something with pip2 I get: Traceback (most
> recent call last): File "/usr/bin/pip2", line 9, in <module>
> load_entry_point('pip==7.1.2', 'console_scripts', 'pip2')() File
> "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line
> 558, in load_entry_point return
> get_distribution(dist).load_entry_point(group, name) File
> "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line
> 2682, in load_entry_point return ep.load() File
> "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line
> 2355, in load return self.resolve() File
> "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line
> 2361, in resolve module = __import__(self.module_name,
> fromlist=['__name__'], level=0) File
> "/usr/lib/python2.7/site-packages/pip/__init__.py", line 15, in
> <module> from pip.vcs import git, mercurial, subversion, bazaar #
> noqa File "/usr/lib/python2.7/site-packages/pip/vcs/subversion.py",
> line 9, in <module> from pip.index import Link File
> "/usr/lib/python2.7/site-packages/pip/index.py", line 30, in
> <module> from pip.wheel import Wheel, wheel_ext File
> "/usr/lib/python2.7/site-packages/pip/wheel.py", line 35, in
> <module> from pip._vendor.distlib.scripts import ScriptMaker File
> "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py",
> line 14, in <module> from .compat import sysconfig, detect_encoding,
> ZipFile File
> "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py",
> line 31, in <module> from urllib2 import (Request, urlopen,
> URLError, HTTPError, ImportError: cannot import name HTTPSHandler
>
> With pip3 I get the same problem.
>
> It looks like openSUSE has done an upgrade in which it disabled
> ssl2. How can I get pip2/3 working again?

Can I make pip work with ssl3?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [prev] | [next] | [standalone]


#99270

FromSteven D'Aprano <steve@pearwood.info>
Date2015-11-24 00:08 +1100
Message-ID<56530fb4$0$1589$c3e8da3$5496439d@news.astraweb.com>
In reply to#99256
On Mon, 23 Nov 2015 06:48 pm, Cecil Westerhof wrote:

> When I try to install something with pip2 I get:
>     Traceback (most recent call last):
[...]
>         from urllib2 import (Request, urlopen, URLError, HTTPError,
>     ImportError: cannot import name HTTPSHandler

Before blaming SUSE for breaking this, please run this at the interactive
interpreter:

import urllib2
print urllib2.__file__


Have you perhaps accidentally shadowed the std lib module?



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#99277

FromCecil Westerhof <Cecil@decebal.nl>
Date2015-11-23 19:23 +0100
Message-ID<87mvu4r2v6.fsf@Equus.decebal.nl>
In reply to#99270
On Monday 23 Nov 2015 14:08 CET, Steven D'Aprano wrote:

> On Mon, 23 Nov 2015 06:48 pm, Cecil Westerhof wrote:
>
>> When I try to install something with pip2 I get:
>> Traceback (most recent call last):
> [...]
>> from urllib2 import (Request, urlopen, URLError, HTTPError,
>> ImportError: cannot import name HTTPSHandler
>
> Before blaming SUSE for breaking this, please run this at the
> interactive interpreter:
>
> import urllib2
> print urllib2.__file__
>
>
> Have you perhaps accidentally shadowed the std lib module?

It worked without fail before the update, but you never know:
    Python 2.7.9 (default, Dec 13 2014, 18:02:08) [GCC] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import urllib2
    >>> print urllib2.__file__
    /usr/lib64/python2.7/urllib2.pyc

So I did not shadow I would think.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [prev] | [next] | [standalone]


#99291

Fromsohcahtoa82@gmail.com
Date2015-11-23 16:47 -0800
Message-ID<44438522-c78e-423c-b809-00e0145f8890@googlegroups.com>
In reply to#99256
On Sunday, November 22, 2015 at 11:59:13 PM UTC-8, Cecil Westerhof wrote:
> When I try to install something with pip2 I get:
>     Traceback (most recent call last):
>       File "/usr/bin/pip2", line 9, in <module>
>         load_entry_point('pip==7.1.2', 'console_scripts', 'pip2')()
>       File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
>         return get_distribution(dist).load_entry_point(group, name)
>       File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
>         return ep.load()
>       File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
>         return self.resolve()
>       File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
>         module = __import__(self.module_name, fromlist=['__name__'], level=0)
>       File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 15, in <module>
>         from pip.vcs import git, mercurial, subversion, bazaar  # noqa
>       File "/usr/lib/python2.7/site-packages/pip/vcs/subversion.py", line 9, in <module>
>         from pip.index import Link
>       File "/usr/lib/python2.7/site-packages/pip/index.py", line 30, in <module>
>         from pip.wheel import Wheel, wheel_ext
>       File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 35, in <module>
>         from pip._vendor.distlib.scripts import ScriptMaker
>       File "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py", line 14, in <module>
>         from .compat import sysconfig, detect_encoding, ZipFile
>       File "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py", line 31, in <module>
>         from urllib2 import (Request, urlopen, URLError, HTTPError,
>     ImportError: cannot import name HTTPSHandler
> 
> With pip3 I get the same problem.
> 
> It looks like openSUSE has done an upgrade in which it disabled ssl2.
> How can I get pip2/3 working again?
> 
> -- 
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof

SSL2 *should* be disabled.  It was deprecated nearly 20 years ago, replaced by SSL3, and even THAT has been deprecated.  SSL2 is incredibly insecure.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web