-
Notifications
You must be signed in to change notification settings - Fork 25.6k
fix python version error #71021
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
fix python version error #71021
Conversation
…nstalled as python2.7 the test will fail with a syntax issue
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow For more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit a8bafd2 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix.
Changing the command to always use python3
should work as well and be simpler no?
i thought that my more complex version would handle the case that they do not have a python3 alias for python 3 and only "python" which refers to python 3. |
Do you know of any OS that does that? My understanding is that you always get base name (not on all OS to avoid confusion just after 2 removal), major and major.minor binary flavors. |
i do not know of a specific OS off the top of my head where that is the default setup, I just thought that it was a possibility if people have older setups that they have updated overtime in custom ways. If you think it is entirely impossible to occur in a custom setup I do not have any evidence to argue the contrary. I was simply trying to cover all possibilities for safety. I will defer to your judgement on this issue. |
Thanks for being careful about that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update!
@albanD has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: if python3 is the one running the tests but there exists a "python" installed as python2.7 the test will fail with a syntax issue Pull Request resolved: #71021 Reviewed By: zou3519 Differential Revision: D33667073 Pulled By: albanD fbshipit-source-id: 8e489b491439be1740fc32ca5c7cdceb2145771e
Summary: if python3 is the one running the tests but there exists a "python" installed as python2.7 the test will fail with a syntax issue Pull Request resolved: pytorch/pytorch#71021 Reviewed By: zou3519 Differential Revision: D33667073 Pulled By: albanD fbshipit-source-id: 8e489b491439be1740fc32ca5c7cdceb2145771e (cherry picked from commit 5adfece)
Summary: if python3 is the one running the tests but there exists a "python" installed as python2.7 the test will fail with a syntax issue Pull Request resolved: pytorch/pytorch#71021 Reviewed By: zou3519 Differential Revision: D33667073 Pulled By: albanD fbshipit-source-id: 8e489b491439be1740fc32ca5c7cdceb2145771e (cherry picked from commit 5adfece)
Summary: if python3 is the one running the tests but there exists a "python" installed as python2.7 the test will fail with a syntax issue Pull Request resolved: pytorch/pytorch#71021 Reviewed By: zou3519 Differential Revision: D33667073 Pulled By: albanD fbshipit-source-id: 8e489b491439be1740fc32ca5c7cdceb2145771e (cherry picked from commit 5adfece)
Summary: if python3 is the one running the tests but there exists a "python" installed as python2.7 the test will fail with a syntax issue Pull Request resolved: pytorch/pytorch#71021 Reviewed By: zou3519 Differential Revision: D33667073 Pulled By: albanD fbshipit-source-id: 8e489b491439be1740fc32ca5c7cdceb2145771e (cherry picked from commit 5adfece)
if python3 is the one running the tests but there exists a "python" installed as python2.7 the test will fail with a syntax issue