Skip to content

Instantly share code, notes, and snippets.

@memandip
Created February 12, 2023 11:31
Show Gist options
  • Save memandip/3c2b56f5c6b89de95742449987cbcb22 to your computer and use it in GitHub Desktop.
Save memandip/3c2b56f5c6b89de95742449987cbcb22 to your computer and use it in GitHub Desktop.
Enable python virtual env to use different python version with aws amplify
- Create virtual env with python `python -m venv my_venv`
- Install required virtual env for target python version
- For eg: if python version is 3.9
- `sudo apt-get install python3.9-venv`
- Change python version for your virtual env
- `virtualenv --python="{{path to target python}}" "/path/to/new/virtualenv/"`
- `virtualenv --python="/usr/bin/python3.9" "{{my_venv}}"
- update your python version in cloudformation file and Pipfile
- amplify push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment