New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python in gradle is using wrong python - it doesn't respect the PATH variable #3942
Comments
Jakub Hava commented: [~accountid:557058:389d9607-5bd8-4611-8c6a-755fe9295223] my idea for the solution is to check PATH variable and pick the first python. This way we don't have to introduce new variable |
Michal Malohlava commented: Exec task should honor setting of PATH (inhering from parent env). But in some cases people have binaries |
Michal Malohlava commented: Oki problem is in Gradle daemon. If Gradle is invoked, by default, it creates a new daemon which is used to invoke any following builds. However, the daemon inherits environment of parent process at launch time. Hence, all our exec tasks inherits the same environment. At the end it means that if you change Python profile (via virtualenv or Conda), then it is not accepted. See following experiment: {noformat} BUILD SUCCESSFUL Total time: 6.54 secs BUILD SUCCESSFUL Total time: 1.388 secs BUILD SUCCESSFUL Total time: 6.88 secs The workaround is to kill/not use gradle daemon or specify Python executable via a property. |
Michal Malohlava commented: It seems that only PATH variable is affected. |
Jakub Hava commented: Michal: {code:java} Yup, it works! |
JIRA Issue Migration Info Jira Issue: SW-392 Linked PRs from JIRA |
JIRA Issue Migration Info Cont'd Jira Issue Created Date: 2017-04-06T03:21:58.788-0700 |
No description provided.
The text was updated successfully, but these errors were encountered: