相关疑难解决方法(0)

14
推荐指数
2
解决办法
8913
查看次数

如何在aws ec2中安装带有nss后端的libcurl?(Python 3.6 64 位亚马逊 Linux)

我在 AWS 中有一个运行 Python3.6 (Amazon Linux/2.8.3) 的 ec2 实例,我需要在其中安装 pycurl 和 NSS ssl backend

pycurl==7.43.0 --global-option="--with-nss"首先,我通过添加到我的文件中进行尝试requirement.txt,但出现错误安装错误。因此,我最终通过添加一个.config文件.ebextensions(在部署期间运行)来完成此操作:

container_commands:
  09_pycurl_reinstall:
    # the upgrade option is because it will run after PIP installs the requirements.txt file.
    # and it needs to be done with the virtual-env activated
    command: 'source /opt/python/run/venv/bin/activate && PYCURL_SSL_LIBRARY=nss pip3 install pycurl --global-option="--with-nss" --upgrade --no-cache-dir --compile --ignore-installed'
Run Code Online (Sandbox Code Playgroud)


Pycurl 似乎已正确安装,但 celery 工作程序未运行。芹菜工人日志显示:

__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file …
Run Code Online (Sandbox Code Playgroud)

python libcurl amazon-ec2 pycurl amazon-web-services

5
推荐指数
1
解决办法
3485
查看次数