# Remove the existing external environment poetry env remove --all # Re-install dependencies to generate the local .venv folder poetry install Use code with caution.
By default, Poetry creates and manages virtual environments in a centralized global cache directory on your machine (for example, ~/.cache/pypoetry/virtualenvs on macOS/Linux). pylance missing imports poetry link
: The next time you run poetry install , Poetry will create the virtual environment in a .venv folder at your project's root. It's highly recommended to remove the old environment first: # Remove the existing external environment poetry env