Skip to content

Instantly share code, notes, and snippets.

@vivekfe
Created October 8, 2022 15:04
Show Gist options
  • Save vivekfe/b80e165da11a6cbb51c50d301aaef0ad to your computer and use it in GitHub Desktop.
Save vivekfe/b80e165da11a6cbb51c50d301aaef0ad to your computer and use it in GitHub Desktop.
To Create a Python Based virtual env using Poetry
- 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