mirror of
https://github.com/python-poetry/install.python-poetry.org.git
synced 2024-11-06 06:05:52 -05:00
fix: check that sys.executable is valid before env creation
This commit is contained in:
parent
206447fcd4
commit
e8d8f76750
1 changed files with 5 additions and 0 deletions
|
@ -293,6 +293,11 @@ class VirtualEnvironment:
|
|||
|
||||
@classmethod
|
||||
def make(cls, target: Path) -> "VirtualEnvironment":
|
||||
if not sys.executable:
|
||||
raise ValueError(
|
||||
"Unable to determine sys.executable. Set PATH to a sane value or set it explicitly with PYTHONEXECUTABLE."
|
||||
)
|
||||
|
||||
try:
|
||||
# on some linux distributions (eg: debian), the distribution provided python
|
||||
# installation might not include ensurepip, causing the venv module to
|
||||
|
|
Loading…
Reference in a new issue