Created
October 8, 2022 15:04
-
-
Save vivekfe/b80e165da11a6cbb51c50d301aaef0ad to your computer and use it in GitHub Desktop.
To Create a Python Based virtual env using Poetry
This file contains 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
- Install Poetry using curl -sSL https://install.python-poetry.org | python | |
- Navigate to a directory where you would like to create a virtual env along with the project | |
If you would like to name project 'ft' | |
- poetry new ft | |
To create a new pyproject.toml | |
- poetry init | |
- poetry config virtualenvs.create true --local | |
- poetry config virtualenvs.in-project true --local | |
This will create poetry.toml | |
To create a new virtual env within project, try to add a new package and it will create a new virtual env | |
- poetry add requests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment