Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
69d790b1
Commit
69d790b1
authored
Dec 01, 2021
by
finswimmer
Committed by
Bjorn Neergaard
Jan 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
d4d03d0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletions
+24
-1
docs/configuration.md
+8
-0
docs/managing-environments.md
+16
-1
No files found.
docs/configuration.md
View file @
69d790b1
...
@@ -48,6 +48,7 @@ virtualenvs.in-project = null
...
@@ -48,6 +48,7 @@ virtualenvs.in-project = null
virtualenvs.options.always-copy
=
true
virtualenvs.options.always-copy
=
true
virtualenvs.options.system-site-packages
=
false
virtualenvs.options.system-site-packages
=
false
virtualenvs.path
=
"{cache-dir}/virtualenvs"
# /path/to/cache/directory/virtualenvs
virtualenvs.path
=
"{cache-dir}/virtualenvs"
# /path/to/cache/directory/virtualenvs
virtualenvs.prefer-shell-python
=
false
```
```
## Displaying a single configuration setting
## Displaying a single configuration setting
...
@@ -188,6 +189,13 @@ Give the virtual environment access to the system site-packages directory.
...
@@ -188,6 +189,13 @@ Give the virtual environment access to the system site-packages directory.
Applies on virtualenv creation.
Applies on virtualenv creation.
Defaults to
`false`
.
Defaults to
`false`
.
### `virtualenvs.prefer-shell-python`
**Type**
: boolean
Use currently activated Python version to create a new venv.
Defaults to
`false`
, which means Python version used during Poetry installation is used.
### `repositories.<name>`
### `repositories.<name>`
**Type**
: string
**Type**
: string
...
...
docs/managing-environments.md
View file @
69d790b1
...
@@ -18,7 +18,7 @@ To achieve this, it will first check if it's currently running inside a virtual
...
@@ -18,7 +18,7 @@ To achieve this, it will first check if it's currently running inside a virtual
If it is, it will use it directly without creating a new one. But if it's not, it will use
If it is, it will use it directly without creating a new one. But if it's not, it will use
one that it has already created or create a brand new one for you.
one that it has already created or create a brand new one for you.
By default, Poetry will try to use the
currently activated Python vers
ion
By default, Poetry will try to use the
Python version used during Poetry's installat
ion
to create the virtual environment for the current project.
to create the virtual environment for the current project.
However, for various reasons, this Python version might not be compatible
However, for various reasons, this Python version might not be compatible
...
@@ -26,6 +26,21 @@ with the `python` requirement of the project. In this case, Poetry will try
...
@@ -26,6 +26,21 @@ with the `python` requirement of the project. In this case, Poetry will try
to find one that is and use it. If it's unable to do so then you will be prompted
to find one that is and use it. If it's unable to do so then you will be prompted
to activate one explicitly, see
[
Switching environments
](
#switching-between-environments
)
.
to activate one explicitly, see
[
Switching environments
](
#switching-between-environments
)
.
{{% note %}}
To easily switch between Python versions, it is recommended to
use
[
pyenv
](
https://github.com/pyenv/pyenv
)
or similar tools.
For instance, if your project requires a newer Python than is available with
your system, a standard workflow would be:
```
bash
pyenv install 3.9.8
pyenv
local
3.9.8
# Activate Python 3.9 for the current project
poetry install
```
This requires setting the
`virtualenvs.prefer-shell-python`
option to
`true`
.
{{% /note %}}
## Switching between environments
## Switching between environments
Sometimes this might not be feasible for your system, especially Windows where
`pyenv`
Sometimes this might not be feasible for your system, especially Windows where
`pyenv`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment