无法在win10上的Python3.4中安装io模块

2024-06-02 07:35:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图在我的Win10上用python3.4或py 2.7安装io模块

python -m pip install io

为了将io.StringIO与pycurl一起使用,但在这两种情况下都会说:

   Could not find a version that satisfies the requirement io (from versions: )
   No matching distribution found for io

实际上,我想使用curl和GET方法访问spotify
上的一个https站点,并处理json结果。。。

知道吗?
谢谢


Tags: 模块installpippyiothatversionnot
2条回答

io模块已经是Python的一部分。它在Python 2.6以后的标准库中。请参阅文档的Python 2Python 3版本。

事实上,没有^{} package on PyPI要安装(链接给出404 not found错误)。

注意,我希望pycurl编写bytestrings,而不是Unicode文本。您可能想在这里使用io.BytesIO。请参见Pycurl and io.StringIO - pycurl.error: (23, 'Failed writing body)PyCurl documentation

您不必显式安装^{}。它在安装python时附带python包。在你的代码中,只需:

import io

会很好的

相关问题 更多 >