就像我在将 pip 安装 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('"'"'rn'"'"', '"'"'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 from/usr/local/lib/python3.8/site-packages/pip (Python 3.8(
-蟒蛇 3.8.0
我试过(这篇文章是在帖子发布后发布的(:
此链接 Python3:导入错误:使用来自模块多处理的值时没有名为"_ctypes"的模块
和
尝试以下命令:
python3.8 -m pip install ctypes
,然后尝试执行与安装相同的安装过程。
希望这有帮助!