gpt4 book ai didi

python - 如何解释这个回溯?

转载 作者:太空宇宙 更新时间:2023-11-03 12:58:25 25 4
gpt4 key购买 nike

我正在设置一台新的开发机器并安装我的 IDE pycharm。我将 python 安装到 C:\Program (x86)\python27。但是当我启动我的 gae 服务器时,我得到了这个回溯。什么意思?

pydev debugger: process 7576 is connecting

Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.3\helpers\pydev\pydevd.py", line 2358, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.3\helpers\pydev\pydevd.py", line 1778, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files (x86)\Google\google_appengine\_python_runtime.py", line 83, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\_python_runtime.py", line 79, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 175, in <module>
main()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 155, in main
sandbox.enable_sandbox(config)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 189, in enable_sandbox
from google.appengine.runtime import runtime
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\runtime.py", line 40, in <module>
from google.appengine.runtime import cgi
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\cgi.py", line 32, in <module>
from email import feedparser
File "C:\Program Files (x86)\python27\lib\email\feedparser.py", line 27, in <module>
from email import message
File "C:\Program Files (x86)\python27\lib\email\message.py", line 16, in <module>
import email.charset
File "C:\Program Files (x86)\python27\lib\email\charset.py", line 13, in <module>
import email.base64mime
File "C:\Program Files (x86)\python27\lib\email\base64mime.py", line 40, in <module>
from email.utils import fix_eols
File "C:\Program Files (x86)\python27\lib\email\utils.py", line 28, in <module>
import socket
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 829, in load_module
return self.import_stub_module(fullname)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 841, in import_stub_module
__import__(fullname, {}, {})
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\dist27\socket.py", line 73, in <module>
from _ssl import RAND_add, RAND_egd, RAND_status, SSL_ERROR_ZERO_RETURN, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_X509_LOOKUP, SSL_ERROR_SYSCALL, SSL_ERROR_SSL, SSL_ERROR_WANT_CONNECT, SSL_ERROR_EOF, SSL_ERROR_INVALID_ERROR_CODE
ImportError: cannot import name RAND_egd
pydev debugger: process 2496 is connecting

Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.3\helpers\pydev\pydevd.py", line 2358, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.3\helpers\pydev\pydevd.py", line 1778, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files (x86)\Google\google_appengine\_python_runtime.py", line 83, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\_python_runtime.py", line 79, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 175, in <module>
main()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 155, in main
sandbox.enable_sandbox(config)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 189, in enable_sandbox
from google.appengine.runtime import runtime
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\runtime.py", line 40, in <module>
from google.appengine.runtime import cgi
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\cgi.py", line 32, in <module>
from email import feedparser
File "C:\Program Files (x86)\python27\lib\email\feedparser.py", line 27, in <module>
from email import message
File "C:\Program Files (x86)\python27\lib\email\message.py", line 16, in <module>
import email.charset
File "C:\Program Files (x86)\python27\lib\email\charset.py", line 13, in <module>
import email.base64mime
File "C:\Program Files (x86)\python27\lib\email\base64mime.py", line 40, in <module>
from email.utils import fix_eols
File "C:\Program Files (x86)\python27\lib\email\utils.py", line 28, in <module>
import socket
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 829, in load_module
return self.import_stub_module(fullname)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 841, in import_stub_module
__import__(fullname, {}, {})
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\dist27\socket.py", line 73, in <module>
from _ssl import RAND_add, RAND_egd, RAND_status, SSL_ERROR_ZERO_RETURN, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_X509_LOOKUP, SSL_ERROR_SYSCALL, SSL_ERROR_SSL, SSL_ERROR_WANT_CONNECT, SSL_ERROR_EOF, SSL_ERROR_INVALID_ERROR_CODE
ImportError: cannot import name RAND_egd

如果我以管理员身份运行 pip install PyOpenSLL 然后我得到

C:\>pip install pyopensll
Collecting pyopensll
Could not find a version that satisfies the requirement pyopensll (from versio
ns: )
No matching distribution found for pyopensll

C:\>pip install pyOpenSSL
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in c:\progra
m files (x86)\python27\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in c:\progr
am files (x86)\python27\lib\site-packages (from pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): cryptography>=0.7 in c
:\program files (x86)\python27\lib\site-packages (from pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\progr
am files (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): enum34 in c:\program f
iles (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in c:\program f
iles (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): idna in c:\program fil
es (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in c:\progra
m files (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): cffi>=0.8 in c:\progra
m files (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): pycparser in c:\progra
m files (x86)\python27\lib\site-packages (from cffi>=0.8->cryptography>=0.7->pyO
penSSL)

C:\>

最佳答案

新:

您似乎使用 LibreSSL 而不是 OpenSSL。参见 Python: Issue 21356

通过在 python-shell 中运行它来检查您是否正在使用 LibreSSL:

from ssl import OPENSSL_VERSION; print OPENSSL_VERSION

旧的:

File "C:\Program Files (x86)\Google\google_appengine\google\appengine\dist27\socket.py", line 73, in <module>
from _ssl import RAND_add, RAND_egd, RAND_status, SSL_ERROR_ZERO_RETURN, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_X509_LOOKUP, SSL_ERROR_SYSCALL, SSL_ERROR_SSL, SSL_ERROR_WANT_CONNECT, SSL_ERROR_EOF, SSL_ERROR_INVALID_ERROR_CODE
ImportError: cannot import name RAND_egd

是您必须知道的。用非常简单的写作,它意味着:“Google 的应用引擎无法在模块 _ssl 中找到名为 RAND_egd 的名称”

尝试更新所有包。

尝试从控制台from _ssl Import RAND_egd,然后将结果放在这里。

关于python - 如何解释这个回溯?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31549052/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com