【问题标题】:ERROR: Command errored out with exit status 1 with sudo pip3.8 install websocket,错误:使用 sudo pip3.8 install websocket 命令出错,退出状态为 1,
【发布时间】:2020-07-03 07:52:00
【问题描述】:

当我将 pip install websockets 安装在 rasberry pi 上时,就像我在标题上一样,就像在这个网站上所说的 https://pypi.org/project/websockets/ 它会出现这个错误

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting websocket
  Using cached https://www.piwheels.org/simple/websocket/websocket-0.2.1-py3-none-any.whl (191 kB)
Collecting greenlet
  Using cached greenlet-0.4.16.tar.gz (60 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1r2o5cjv/greenlet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1r2o5cjv/greenlet/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-pip-egg-info-u9pmz3n4
         cwd: /tmp/pip-install-1r2o5cjv/greenlet/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 19, in <module>
        from setuptools.dist import Distribution
      File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 34, in <module>
        from setuptools import windows_support
      File "/usr/local/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/usr/local/lib/python3.8/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named '_ctypes'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

版本

-pip 20.1.1 来自 /usr/local/lib/python3.8/site-packages/pip (python 3.8)

-Python 3.8.0

我试过了(这篇文章是在帖子发布后才有的)

此链接Python3: ImportError: No module named '_ctypes' when using Value from module multiprocessing

【问题讨论】:

标签: python-3.x pip


【解决方案1】:

试试下面的命令:

    python3.8 -m pip install ctypes

然后尝试与您相同的安装过程。

希望这会有所帮助!

【讨论】:

  • 谢谢,但他提出了这个错误:` 错误:找不到满足 ctypes 要求的版本(来自版本:无)错误:没有找到 ctypes 的匹配分布`
  • ctypesa part of stdlib,不能单独安装。
猜你喜欢
  • 1970-01-01
  • 2020-08-14
  • 1970-01-01
  • 1970-01-01
  • 2020-07-19
  • 2021-07-12
  • 2020-03-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多