无法使用套接字

时间:2019-06-21 16:19:49

标签: python anaconda

我正在尝试导入套接字,但出现以下错误:

$ python
Python 2.7.16 |Anaconda, Inc.| (default, Mar 14 2019, 16:24:02)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "socket.py", line 68, in <module>
    from _ssl import \
ImportError: cannot import name RAND_egd

我认为也许我的Anaconda安装已损坏,所以我卸载并重新安装了Anaconda,但错误仍然存​​在。
由于Macos系统完整性保护,除了编辑socket.py之外,我尝试了其他帖子的建议。我的猜测是问题出在其他地方,因为我怀疑每个人都必须编辑该文件。

如何找到问题的根源?

0 个答案:

没有答案