From 1adb70c6f06f584361590e36b45a348dbb056c16 Mon Sep 17 00:00:00 2001 From: Michael Suo Date: Tue, 4 Jan 2022 16:35:46 -0800 Subject: [PATCH] Revert D33409880: [pytorch][PR] Deprecating Python 3.6 Test Plan: revert-hammer Differential Revision: D33409880 (https://github.com/pytorch/pytorch/commit/d95be995617010c033252b46d96b5148e8ff1fa7) Original commit changeset: 4f9123398960 Original Phabricator Diff: D33409880 (https://github.com/pytorch/pytorch/commit/d95be995617010c033252b46d96b5148e8ff1fa7) fbshipit-source-id: 32dc1c3c07ef99a04fab7d0fb742cf4e6c4b718a --- .../data/simple/util/docker_constants.py | 4 ++-- .circleci/config.yml | 16 ++++++++-------- .../job-specs/job-specs-custom.yml | 12 ++++++------ .../job-specs/pytorch-job-specs.yml | 4 ++-- .jenkins/pytorch/build.sh | 2 +- CONTRIBUTING.md | 2 +- README.md | 18 +++++++++--------- cmake/Dependencies.cmake | 6 +++--- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.circleci/cimodel/data/simple/util/docker_constants.py b/.circleci/cimodel/data/simple/util/docker_constants.py index 985466718ea19..cfc2c2495efd6 100644 --- a/.circleci/cimodel/data/simple/util/docker_constants.py +++ b/.circleci/cimodel/data/simple/util/docker_constants.py @@ -11,7 +11,7 @@ def gen_docker_image_requires(image_name): DOCKER_IMAGE_BASIC, DOCKER_REQUIREMENT_BASE = gen_docker_image( - "pytorch-linux-xenial-py3.7-gcc5.4" + "pytorch-linux-xenial-py3.6-gcc5.4" ) DOCKER_IMAGE_CUDA_10_2, DOCKER_REQUIREMENT_CUDA_10_2 = gen_docker_image( @@ -19,7 +19,7 @@ def gen_docker_image_requires(image_name): ) DOCKER_IMAGE_GCC7, DOCKER_REQUIREMENT_GCC7 = gen_docker_image( - "pytorch-linux-xenial-py3.7-gcc7" + "pytorch-linux-xenial-py3.6-gcc7" ) diff --git a/.circleci/config.yml b/.circleci/config.yml index 70a9e7f08e424..0e85d6dbedd4d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -605,10 +605,10 @@ jobs: command: | set -e is_vanilla_build() { - if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-bionic-py3.7-clang9-test" ]; then + if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-bionic-py3.6-clang9-test" ]; then return 0 fi - if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-xenial-py3.7-gcc5.4-test" ]; then + if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-xenial-py3.6-gcc5.4-test" ]; then return 0 fi return 1 @@ -1107,7 +1107,7 @@ jobs: pytorch_python_doc_build: environment: BUILD_ENVIRONMENT: pytorch-python-doc-push - DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4" + DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -1153,7 +1153,7 @@ jobs: pytorch_cpp_doc_build: environment: BUILD_ENVIRONMENT: pytorch-cpp-doc-push - DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4" + DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -1333,7 +1333,7 @@ jobs: environment: BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-build DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c" - PYTHON_VERSION: "3.7" + PYTHON_VERSION: "3.6" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -1422,7 +1422,7 @@ jobs: environment: BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-publish-snapshot DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c" - PYTHON_VERSION: "3.7" + PYTHON_VERSION: "3.6" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -1458,7 +1458,7 @@ jobs: environment: BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-build-only-x86_32 DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c" - PYTHON_VERSION: "3.7" + PYTHON_VERSION: "3.6" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -1740,7 +1740,7 @@ jobs: pytorch_doc_test: environment: BUILD_ENVIRONMENT: pytorch-doc-test - DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4" + DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4" resource_class: medium machine: image: ubuntu-2004:202104-01 diff --git a/.circleci/verbatim-sources/job-specs/job-specs-custom.yml b/.circleci/verbatim-sources/job-specs/job-specs-custom.yml index 95a2d79837b6a..2fa8d2273654e 100644 --- a/.circleci/verbatim-sources/job-specs/job-specs-custom.yml +++ b/.circleci/verbatim-sources/job-specs/job-specs-custom.yml @@ -27,7 +27,7 @@ pytorch_python_doc_build: environment: BUILD_ENVIRONMENT: pytorch-python-doc-push - DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4" + DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -73,7 +73,7 @@ pytorch_cpp_doc_build: environment: BUILD_ENVIRONMENT: pytorch-cpp-doc-push - DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4" + DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -253,7 +253,7 @@ environment: BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-build DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c" - PYTHON_VERSION: "3.7" + PYTHON_VERSION: "3.6" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -342,7 +342,7 @@ environment: BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-publish-snapshot DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c" - PYTHON_VERSION: "3.7" + PYTHON_VERSION: "3.6" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -378,7 +378,7 @@ environment: BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-build-only-x86_32 DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c" - PYTHON_VERSION: "3.7" + PYTHON_VERSION: "3.6" resource_class: large machine: image: ubuntu-2004:202104-01 @@ -660,7 +660,7 @@ pytorch_doc_test: environment: BUILD_ENVIRONMENT: pytorch-doc-test - DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4" + DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4" resource_class: medium machine: image: ubuntu-2004:202104-01 diff --git a/.circleci/verbatim-sources/job-specs/pytorch-job-specs.yml b/.circleci/verbatim-sources/job-specs/pytorch-job-specs.yml index 79f879a13f019..58404bb0826d8 100644 --- a/.circleci/verbatim-sources/job-specs/pytorch-job-specs.yml +++ b/.circleci/verbatim-sources/job-specs/pytorch-job-specs.yml @@ -148,10 +148,10 @@ jobs: command: | set -e is_vanilla_build() { - if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-bionic-py3.7-clang9-test" ]; then + if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-bionic-py3.6-clang9-test" ]; then return 0 fi - if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-xenial-py3.7-gcc5.4-test" ]; then + if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-xenial-py3.6-gcc5.4-test" ]; then return 0 fi return 1 diff --git a/.jenkins/pytorch/build.sh b/.jenkins/pytorch/build.sh index 873e384c81c74..49c41a831bed9 100755 --- a/.jenkins/pytorch/build.sh +++ b/.jenkins/pytorch/build.sh @@ -192,7 +192,7 @@ if [[ "${BUILD_ENVIRONMENT}" == *clang* ]]; then export CXX=clang++ fi -if [[ "${BUILD_ENVIRONMENT}" == *linux-xenial-py3.7-gcc7-build* || "${BUILD_ENVIRONMENT}" == *linux-xenial-py3.7-gcc5.4-build* ]]; then +if [[ "${BUILD_ENVIRONMENT}" == *linux-xenial-py3.6-gcc7-build* || "${BUILD_ENVIRONMENT}" == *linux-xenial-py3.6-gcc5.4-build* ]]; then export USE_GLOO_WITH_OPENSSL=ON fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6984ee6c0e25e..498dc31a2bd14 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -149,7 +149,7 @@ that, you can install in `develop` mode again. * A prerequisite to installing PyTorch is CMake. We recommend installing it with [Homebrew](https://brew.sh/) with `brew install cmake` if you are developing on MacOS or Linux system. -* Our `setup.py` requires Python >= 3.7 +* Our `setup.py` requires Python >= 3.6 * If a commit is simple and doesn't affect any code (keep in mind that some docstrings contain code that is used in tests), you can add `[skip ci]` (case sensitive) somewhere in your commit message to [skip all build / test steps](https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/). diff --git a/README.md b/README.md index 88a77f04b3455..c7b9fb7446074 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,14 @@ You can reuse your favorite Python packages such as NumPy, SciPy, and Cython to -| System | 3.7 | 3.8 | -| :---: | :---: | :--: | -| Linux CPU | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-master/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-master/) |
| -| Linux GPU | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-master/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-master/) |
| -| Windows CPU / GPU | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-win-ws2016-cuda9-cudnn7-py3-trigger/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-win-ws2016-cuda9-cudnn7-py3-trigger/) |
| -| Linux (ppc64le) CPU | [![Build Status](https://powerci.osuosl.org/job/pytorch-master-nightly-py3-linux-ppc64le/badge/icon)](https://powerci.osuosl.org/job/pytorch-master-nightly-py3-linux-ppc64le/) |
| -| Linux (ppc64le) GPU | [![Build Status](https://powerci.osuosl.org/job/pytorch-master-nightly-py3-linux-ppc64le-gpu/badge/icon)](https://powerci.osuosl.org/job/pytorch-master-nightly-py3-linux-ppc64le-gpu/) |
| -| Linux (aarch64) CPU | [![Build Status](http://openlabtesting.org:15000/badge?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py37)](https://status.openlabtesting.org/builds/builds?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py37) | [![Build Status](http://openlabtesting.org:15000/badge?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py38)](https://status.openlabtesting.org/builds/builds?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py38) | +| System | 3.6 | 3.7 | 3.8 | +| :---: | :---: | :---: | :--: | +| Linux CPU | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-master/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-master/) | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-master/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-master/) |
| +| Linux GPU | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-master/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-master/) | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-master/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-master/) |
| +| Windows CPU / GPU |
| [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-win-ws2016-cuda9-cudnn7-py3-trigger/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-win-ws2016-cuda9-cudnn7-py3-trigger/) |
| +| Linux (ppc64le) CPU |
| [![Build Status](https://powerci.osuosl.org/job/pytorch-master-nightly-py3-linux-ppc64le/badge/icon)](https://powerci.osuosl.org/job/pytorch-master-nightly-py3-linux-ppc64le/) |
| +| Linux (ppc64le) GPU |
| [![Build Status](https://powerci.osuosl.org/job/pytorch-master-nightly-py3-linux-ppc64le-gpu/badge/icon)](https://powerci.osuosl.org/job/pytorch-master-nightly-py3-linux-ppc64le-gpu/) |
| +| Linux (aarch64) CPU | [![Build Status](http://openlabtesting.org:15000/badge?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py36)](https://status.openlabtesting.org/builds/builds?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py36) | [![Build Status](http://openlabtesting.org:15000/badge?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py37)](https://status.openlabtesting.org/builds/builds?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py37) | [![Build Status](http://openlabtesting.org:15000/badge?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py38)](https://status.openlabtesting.org/builds/builds?project=pytorch%2Fpytorch&job_name=pytorch-arm64-build-daily-master-py38) | See also the [CI HUD at hud.pytorch.org](https://hud.pytorch.org/ci/pytorch/pytorch/master). @@ -167,7 +167,7 @@ They require JetPack 4.2 and above, and [@dusty-nv](https://github.com/dusty-nv) ### From Source -If you are installing from source, you will need Python 3.7 or later and a C++14 compiler. Also, we highly recommend installing an [Anaconda](https://www.anaconda.com/distribution/#download-section) environment. +If you are installing from source, you will need Python 3.6.2 or later and a C++14 compiler. Also, we highly recommend installing an [Anaconda](https://www.anaconda.com/distribution/#download-section) environment. You will get a high-quality BLAS library (MKL) and you get controlled dependency versions regardless of your Linux distro. Once you have [Anaconda](https://www.anaconda.com/distribution/#download-section) installed, here are the instructions. diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index bb14176f3255f..d5f26b7b68a8a 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -1047,7 +1047,7 @@ if(BUILD_PYTHON) # These should fill in the rest of the variables, like versions, but resepct # the variables we set above - set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION} 3.8 3.7) + set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION} 3.8 3.7 3.6) find_package(PythonInterp 3.0) find_package(PythonLibs 3.0) @@ -1055,9 +1055,9 @@ if(BUILD_PYTHON) message(FATAL_ERROR "Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 2 has reached end-of-life and is no longer supported by PyTorch.") endif() - if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3.7) + if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3.6) message(FATAL_ERROR - "Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 3.6 is no longer supported by PyTorch.") + "Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 3.5 is no longer supported by PyTorch.") endif() # When building pytorch, we pass this in directly from setup.py, and