gpt4 book ai didi

python - 安装用于编译 pyOpenSSL 的 python setuptools 时出错

转载 作者:行者123 更新时间:2023-12-01 05:21:09 25 4
gpt4 key购买 nike

我想使用 pyOpenSSL,我已下载并尝试构建它,但我在安装工具方面遇到问题。首先我下载了​​just python并没有成功使用它,但现在我尝试使用 WinPython 并得到了相同的结果,即:

    Traceback (most recent call last):
File "setup.py", line 11, in <module>
from setuptools import setup
File "C:\Users\User\Downloads\WinPython-32bit-2.7.6.3\python-2.7.6\lib\site-packages\setuptools\__init_
_.py", line 11, in <module>
from setuptools.extension import Extension
File "C:\Users\User\Downloads\WinPython-32bit-2.7.6.3\python-2.7.6\lib\site-packages\setuptools\extensi
on.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "C:\Users\User\Downloads\WinPython-32bit-2.7.6.3\python-2.7.6\lib\site-packages\setuptools\dist.py
", line 15, in <module>
from setuptools.compat import numeric_types, basestring
File "C:\Users\User\Downloads\WinPython-32bit-2.7.6.3\python-2.7.6\lib\site-packages\setuptools\compat.
py", line 19, in <module>
from SimpleHTTPServer import SimpleHTTPRequestHandler
File "C:\Users\User\Downloads\WinPython-32bit-2.7.6.3\python-2.7.6\lib\SimpleHTTPServer.py", line 27, i
n <module>
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
File "C:\Users\User\Downloads\WinPython-32bit-2.7.6.3\python-2.7.6\lib\SimpleHTTPServer.py", line 208,
in SimpleHTTPRequestHandler
mimetypes.init() # try to read system mime.types
File "C:\Users\User\Downloads\WinPython-32bit-2.7.6.3\python-2.7.6\lib\mimetypes.py", line 358, in init

db.read_windows_registry()
File "C:\Users\User\Downloads\WinPython-32bit-2.7.6.3\python-2.7.6\lib\mimetypes.py", line 260, in read
_windows_registry
with _winreg.OpenKey(hkcr, subkeyname) as subkey:
TypeError: must be string without null bytes or None, not str

我已经使用 PyCharm 安装了 Python 2.7.6,但没有成功,并且还尝试了 WinPython,结果相同。我运行的是 Windows 7 x64。

最佳答案

由于您在安装setuptools本身时遇到问题,您可以从this下载setuptools的Windows二进制文件关联。该网站是一个很棒的存储库,其中包含各种 Python 模块的预编译 Windows 二进制文件。

如果不需要安装64位Python,我建议您安装32位版本的Python和其他模块。

关于python - 安装用于编译 pyOpenSSL 的 python setuptools 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22353643/

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