Created
February 12, 2023 11:31
-
-
Save memandip/3c2b56f5c6b89de95742449987cbcb22 to your computer and use it in GitHub Desktop.
Enable python virtual env to use different python version with aws amplify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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