You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AWS Lambda部署RDKit遇libXrender.so.1缺失问题求助

RDKit在AWS Lambda SAM构建环境中缺少libXrender.so.1的解决疑问

运行使用pip安装的RDKit代码时,出现以下报错:

Traceback (most recent call last): 
File "./app.py", line 12, in <module> from rdkit.Chem import Draw 
File "/var/lang/lib/python3.8/site-packages/rdkit/Chem/Draw/__init__.py", 
line 21, in <module> from rdkit.Chem.Draw import rdMolDraw2D 
ImportError: libXrender.so.1: cannot open shared object file: No such file or directory

常规情况下该问题可通过执行sudo apt-get install libxrender1解决,但我使用public.ecr.aws/sam/build-python3.8:1.71.0-20230124190835镜像构建Docker时无法执行该操作。

看到RDKit论坛线程建议使用特定conda-forge源,我计划改用miniconda基础镜像重建,但担心该方案与AWS Lambda无服务器部署不兼容。请问是否有遗漏的解决方案?后续我会反馈我的临时解决办法。


内容的提问来源于stack exchange,提问作者rictuar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.02 18:15:36