Can I update Amazon's old versions of pip and setuptools?

前端 未结 2 902
无人及你
无人及你 2021-02-04 07:44

Can I update or remove the pip and setuptools provided with AWS Elastic Beanstalk?

The versions of pip and setuptools provided with my AWS Elastic Beanstalk Python envir

2条回答
  •  我在风中等你
    2021-02-04 08:25

    Try adding an ebextension file that will upgrade pip before running pip install -r requirements.txt

    for example:

    004_prehook.config

    files:
      "/opt/elasticbeanstalk/hooks/appdeploy/pre/02a_upgrade_pip.sh":
      mode: "000755"
      owner: root
      group: root
      content: |
        #!/usr/bin/env bash
        source /opt/python/run/venv/bin/activate
        python3 -m pip install --upgrade pip
    

提交回复
热议问题