Set Python command to usr/local/python3.

This commit is contained in:
NissimHadar 2018-11-01 12:17:53 -07:00
parent 8e3f2d3601
commit 61ba685022

View file

@ -14,6 +14,7 @@
#include <QProcess>
PythonInterface::PythonInterface() {
#ifdef Q_OS_WIN
if (QProcessEnvironment::systemEnvironment().contains("PYTHON_PATH")) {
QString _pythonPath = QProcessEnvironment::systemEnvironment().value("PYTHON_PATH");
if (!QFile::exists(_pythonPath + "/" + _pythonExe)) {
@ -27,6 +28,14 @@ PythonInterface::PythonInterface() {
"Please set PYTHON_PATH to directory containing the Python executable");
exit(-1);
}
#elif defined Q_OS_MAC
_pythonCommand = "/usr/local/bin/python3";
if (!QFile::exists(_pythonCommand)) {
QMessageBox::critical(0, "PYTHON_PATH not defined",
"python3 not found at " + _pythonCommand);
exit(-1);
}
#endif
}
QString PythonInterface::getPythonCommand() {