我一直试图在我的 Mac 上通过 pip3 安装烧瓶,但我一直遇到这个错误。我尝试通过 brew 安装 libffi,然后重新安装 python,但仍然无法正常工作。
ERROR: Command errored out with exit status 1:
command: /Users/prachimodi/Desktop/api/.venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zs/w0tb5f4d6dd_c098p_y7f5_r0000gn/T/pip-install-j9j3d44b/MarkupSafe/setup.py'"'"'; __file__='"'"'/private/var/folders/zs/w0tb5f4d6dd_c098p_y7f5_r0000gn/T/pip-install-j9j3d44b/MarkupSafe/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 /private/var/folders/zs/w0tb5f4d6dd_c098p_y7f5_r0000gn/T/pip-pip-egg-info-fb3uduhe
cwd: /private/var/folders/zs/w0tb5f4d6dd_c098p_y7f5_r0000gn/T/pip-install-j9j3d44b/MarkupSafe/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/prachimodi/Desktop/api/.venv/lib/python3.7/site-packages/setuptools/__init__.py", line 19, in <module>
from setuptools.dist import Distribution
File "/Users/prachimodi/Desktop/api/.venv/lib/python3.7/site-packages/setuptools/dist.py", line 34, in <module>
from setuptools import windows_support
File "/Users/prachimodi/Desktop/api/.venv/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/Users/prachimodi/.pyenv/versions/3.7.9/lib/python3.7/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.