mirror of
https://github.com/python-poetry/install.python-poetry.org.git
synced 2024-11-21 05:30:58 -05:00
installer: use virtualenv.pyz when ensurepip absent
This commit is contained in:
parent
303392379b
commit
be23be56c5
1 changed files with 5 additions and 0 deletions
|
@ -294,6 +294,11 @@ class VirtualEnvironment:
|
|||
@classmethod
|
||||
def make(cls, target: Path) -> "VirtualEnvironment":
|
||||
try:
|
||||
# on some linux distributions (eg: debian), the distribution provided python
|
||||
# installation might not include ensurepip, causing the venv module to
|
||||
# fail when attempting to create a virtual environment
|
||||
# we import ensurepip but do not use it explicitly here
|
||||
import ensurepip # noqa: F401
|
||||
import venv
|
||||
|
||||
builder = venv.EnvBuilder(clear=True, with_pip=True, symlinks=False)
|
||||
|
|
Loading…
Reference in a new issue