Search code examples
pythonamazon-web-servicesvirtualenvpyenvchalice

How can I get AWS Chalice to use pyenv virtualenv python version?


I have a virtual environment create from pyenv virtualenv 3.8.8 raai which is active. When I install and then invoke chalice it is using the system installed python version.

How can I get the chalice command to use the pyenv specified/active python?

enter image description here


Solution

  • Try ensuring Chalice is installed in your virtual environment, the chalice that is found in the path may have been installed in your other version of Python.

    When your virtual environment is active, try reinstalling chalice in that virtenv:

    pip install chalice