Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102733
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: ImportError: cannot import name 'RAND_egd' |
| Date | 2016-02-09 13:32 -0700 |
| Message-ID | <mailman.0.1455049984.7749.python-list@python.org> (permalink) |
| References | <4c113094-db27-4b60-9140-eded08939ab0@googlegroups.com> |
On Tue, Feb 9, 2016 at 7:55 AM, <shaunak.bangale@gmail.com> wrote:
> Hi,
>
> I am trying to run a 60 lines Python code which is running on a mac machine but on windows machine, I am getting this error when I run on it on shell(open file and run module). I have Python 3.5 installed.
>
> from _ssl import RAND_status, RAND_egd, RAND_add
> ImportError: cannot import name 'RAND_egd'
Why are you importing these directly from the "_ssl" C module and not
from the "ssl" wrapper module? Anything that starts with an _ should
be considered a private implementation detail and shouldn't be relied
upon.
> Form forums, I found that it is a common error but could not find a good solution that will work for me.
>
> One of the ways was to create scripts folder and putting easy_install.exe and then running easy_install pip but that gave me sytnax error.
>
> Please advise. Thanks in advance.
The ssl module in the standard library has this:
try:
from _ssl import RAND_egd
except ImportError:
# LibreSSL does not provide RAND_egd
pass
So it looks like you cannot depend on ssl.RAND_egd to be present.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ImportError: cannot import name 'RAND_egd' shaunak.bangale@gmail.com - 2016-02-09 06:55 -0800
Re: ImportError: cannot import name 'RAND_egd' Ian Kelly <ian.g.kelly@gmail.com> - 2016-02-09 13:32 -0700
Re: ImportError: cannot import name 'RAND_egd' shaunak.bangale@gmail.com - 2016-02-10 01:32 -0800
csiph-web