Add errors if we try to use PyTorch with Python 2#35611
Add errors if we try to use PyTorch with Python 2#35611dreiss wants to merge 5 commits intogh/dreiss/28/basefrom
Conversation
💊 Build failures summary and remediationsAs of commit 7f7bed7 (more details on the Dr. CI page):
🕵️ 5 new failures recognized by patternsThe following build failures do not appear to be due to upstream breakages:
|
|
@soumith , I'm confused by this failure. Do you know if |
|
I'm not convinced. Re (1), the user is more likely to run into a syntax error first when they try to import PyTorch. I'm not sure the runtime exception is buying you all that much. And we can prevent people from trying to install PyTorch on Python 2 by advertising appropriately in setup.py that it's python 3 only. Re (2), shouldn't cmake check Python version and error out earlier than when you try to compile? |
|
Later diffs in the stack update cmake and setup.py. This is mostly useful for internal builds that don't use those. |
Summary: Python 2 has reached end-of-life and is no longer supported by PyTorch. To avoid confusing behavior when trying to use PyTorch with Python 2, detect this case early and fail with a clear message. This commit covers "import torch" and attempting to build torch/csrc. Test Plan: - Attempted to "import torch" with Python 2 and saw a clear error. - Attempted to build PyTorch with Python 2 and saw a clear error. Differential Revision: [D20842878](https://our.internmc.facebook.com/intern/diff/D20842878)
Summary: Python 2 has reached end-of-life and is no longer supported by PyTorch. To avoid confusing behavior when trying to use PyTorch with Python 2, detect this case early and fail with a clear message. This commit covers "import torch" and attempting to build torch/csrc. Test Plan: - Attempted to "import torch" with Python 2 and saw a clear error. - Attempted to build PyTorch with Python 2 and saw a clear error. Differential Revision: [D20842878](https://our.internmc.facebook.com/intern/diff/D20842878)
Summary: Python 2 has reached end-of-life and is no longer supported by PyTorch. To avoid confusing behavior when trying to use PyTorch with Python 2, detect this case early and fail with a clear message. This commit covers "import torch" and attempting to build torch/csrc. Test Plan: - Attempted to "import torch" with Python 2 and saw a clear error. - Attempted to build PyTorch with Python 2 and saw a clear error. Differential Revision: [D20842878](https://our.internmc.facebook.com/intern/diff/D20842878) [ghstack-poisoned]
Summary: Python 2 has reached end-of-life and is no longer supported by PyTorch. To avoid confusing behavior when trying to use PyTorch with Python 2, detect this case early and fail with a clear message. This commit covers "import torch" and attempting to build torch/csrc. Test Plan: - Attempted to "import torch" with Python 2 and saw a clear error. - Attempted to build PyTorch with Python 2 and saw a clear error. Differential Revision: [D20842878](https://our.internmc.facebook.com/intern/diff/D20842878) [ghstack-poisoned]
Summary: Python 2 has reached end-of-life and is no longer supported by PyTorch. To avoid confusing behavior when trying to use PyTorch with Python 2, detect this case early and fail with a clear message. This commit covers "import torch" and attempting to build torch/csrc. Test Plan: - Attempted to "import torch" with Python 2 and saw a clear error. - Attempted to build PyTorch with Python 2 and saw a clear error. Differential Revision: [D20842878](https://our.internmc.facebook.com/intern/diff/D20842878) [ghstack-poisoned]
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Stack from ghstack:
Summary:
Python 2 has reached end-of-life and is no longer supported by PyTorch.
To avoid confusing behavior when trying to use PyTorch with Python 2,
detect this case early and fail with a clear message. This commit
covers "import torch" and attempting to build torch/csrc.
Test Plan:
Differential Revision: D20842878