mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-27 17:54:39 +03:00
Also handle python3 and pip3
This commit is contained in:
parent
c874dde66c
commit
e8033df81e
|
@ -595,9 +595,9 @@ def run_commands(
|
||||||
command = command.format(**variables)
|
command = command.format(**variables)
|
||||||
command = shlex.split(command)
|
command = shlex.split(command)
|
||||||
# TODO: is this needed / a good idea?
|
# TODO: is this needed / a good idea?
|
||||||
if len(command) and command[0] == "python":
|
if len(command) and command[0] in ("python", "python3"):
|
||||||
command[0] = sys.executable
|
command[0] = sys.executable
|
||||||
elif len(command) and command[0] == "pip":
|
elif len(command) and command[0] in ("pip", "pip3"):
|
||||||
command = [sys.executable, "-m", "pip", *command[1:]]
|
command = [sys.executable, "-m", "pip", *command[1:]]
|
||||||
if not silent:
|
if not silent:
|
||||||
print(" ".join(command))
|
print(" ".join(command))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user