diff --git a/pi_mqtt_gpio/server.py b/pi_mqtt_gpio/server.py index b203974bc7722427d5e82a774e74d6373ecd2c97..fa27e27ac03217d0733912c3f5b3cef04cab133b 100644 --- a/pi_mqtt_gpio/server.py +++ b/pi_mqtt_gpio/server.py @@ -320,7 +320,7 @@ def install_missing_requirements(module): from subprocess import check_call, CalledProcessError try: - check_call(["/usr/bin/env", "pip", "install"] + pkgs_required) + check_call([sys.executable, "-m", "pip", "install"] + pkgs_required) except CalledProcessError as err: raise CannotInstallModuleRequirements( "Unable to install packages for module %r (%s): %s"