Rasbian Lite:电子邮件Python软件包安装(没有名为'cStringIO'的模块)

问题描述 投票:0回答:1

对不起,可能重复。我正在使用Rasbian Lite操作系统。当我尝试安装软件包电子邮件时:

 pi@raspberrypi:~ $ sudo pip3 install email

我收到错误消息:

 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
 Collecting email
 Using cached email-4.0.2.tar.gz (1.2 MB)
 ERROR: Command errored out with exit status 1:
 command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-298bk50t/email/setup.py'"'"'; __file__='"'"'/tmp/pip-install-298bk50t/email/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-298bk50t/email/pip-egg-info
     cwd: /tmp/pip-install-298bk50t/email/
Complete output (11 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 17, in <module>
    import setuptools.version
  File "/usr/local/lib/python3.7/dist-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 36, in <module>
    import email.parser
  File "/tmp/pip-install-298bk50t/email/email/parser.py", line 10, in <module>
    from cStringIO import StringIO
ModuleNotFoundError: No module named 'cStringIO'
----------------------------------------
 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

但是,当我跑步时:

 sudo pip install cStringIO

我收到一个错误:

 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
 ERROR: Could not find a version that satisfies the requirement cStringIO (from versions: none)
 ERROR: No matching distribution found for cStringIO

所以似乎我被卡住了,因为我无法安装cStringIO?任何想法/建议/解决方案将不胜感激。

谢谢!

python python-3.x pip debian package-managers
1个回答
0
投票

已解决:在终端内部使用了错误的python版本

© www.soinside.com 2019 - 2024. All rights reserved.