scrapy在苹果m1上执行scrapy crawl 报memoryError错误。
builtins.MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see cffi.readthedocs.io/en/latest/u…
原因是scrapy抓取https请求时依赖openssl库, python的openssl库是pyopenssl这个包,但这个目前不兼容m1系统。
pyopenssl库的官方仓库也有这个issue:
issue地址:MemoryError: Cannot allocate write+execute memory for ffi.callback() #873
贡献者说这个错误是有办法解决的,但是需要花大量工作,现在还没人来解决。
这个问题我自己又折腾了1个多小时,还是没解决的,问题暂时搁置了。
m1上安装py和c相关的包时总是各种报错和不兼容,喜欢瞎折腾的程序员,不建议使用apple的m1