我无法处理_ctypes错误。如果您有想法,请告诉我。
在CentOS服务器上设置存储库时,我只想运行
python3 setup.py develop
from typing import IO, List
from setuptools import find_packages, setup
def read_req(filename: str) -> List[str]:
f: IO
with open(filename, "r") as f:
return f.read().splitlines()
def main() -> None:
req = read_req("requirements.txt")
mysql = read_req("mysql_requirements.txt")
setup(
name="sample",
description="sample description",
version="0.1.0",
install_requires=req,
extras_require={"mysql": mysql},
packages=find_packages(exclude=["repo/notebooks", "repo/modules", "data/"]),
)
if __name__ == "__main__":
main()
但是,出现以下错误
ModuleNotFoundError: No module named '_ctypes'
尽管我已经执行了几种建议作为互联网解决方案的方法,但我无法解决此问题。
CentOS Linux release 7.5.1804 (Core)
Python 3.7.3
* yum install libffi-devel
* yum install libffi-devel gcc gcc-c++ zlib zlib-devel readline-devel openssl-devel bzip2-devel sqlite-devel