Skip to content

Commit

Permalink
small bugfix
Browse files Browse the repository at this point in the history
fixed "FileNotFoundError: [Errno 2] No such file or directory: 'python' " on ubuntu 20.04
  • Loading branch information
abolix authored Feb 25, 2021
1 parent 5f825c0 commit e1fdf55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion djangocms_installer/install/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def requirements(req_file, pip_options="", is_file=False, verbose=False):
sys.stdout.write("python path: {}\n".format(sys.executable))
sys.stdout.write("packages install command: {}\n".format(" ".join(cmd)))
try:
subprocess.check_output(["python", "-msite"], stderr=subprocess.STDOUT)
try:
subprocess.check_output(["python", "-msite"], stderr=subprocess.STDOUT)
except FileNotFoundError:
subprocess.check_output(["python3", "-msite"], stderr=subprocess.STDOUT)
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
sys.stdout.write(output.decode("utf-8"))
except Exception as e: # pragma: no cover
Expand Down

0 comments on commit e1fdf55

Please sign in to comment.