Skip to content

Commit 6c44371

Browse files
atalmanfacebook-github-bot
authored andcommitted
Deprecating Python 3.6 (pytorch#70493)
Summary: Deprecating python 3.6 from documentation and from cmake Pull Request resolved: pytorch#70493 Reviewed By: suo Differential Revision: D33433118 Pulled By: atalman fbshipit-source-id: c3adc7b75714efdb5b6acda5d4cddc068fb4a145
1 parent 025cd69 commit 6c44371

File tree

8 files changed

+32
-32
lines changed

8 files changed

+32
-32
lines changed

.circleci/cimodel/data/simple/util/docker_constants.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ def gen_docker_image_requires(image_name):
1111

1212

1313
DOCKER_IMAGE_BASIC, DOCKER_REQUIREMENT_BASE = gen_docker_image(
14-
"pytorch-linux-xenial-py3.6-gcc5.4"
14+
"pytorch-linux-xenial-py3.7-gcc5.4"
1515
)
1616

1717
DOCKER_IMAGE_CUDA_10_2, DOCKER_REQUIREMENT_CUDA_10_2 = gen_docker_image(
1818
"pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
1919
)
2020

2121
DOCKER_IMAGE_GCC7, DOCKER_REQUIREMENT_GCC7 = gen_docker_image(
22-
"pytorch-linux-xenial-py3.6-gcc7"
22+
"pytorch-linux-xenial-py3.7-gcc7"
2323
)
2424

2525

.circleci/config.yml

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/verbatim-sources/job-specs/job-specs-custom.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
pytorch_python_doc_build:
2828
environment:
2929
BUILD_ENVIRONMENT: pytorch-python-doc-push
30-
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4"
30+
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4"
3131
resource_class: large
3232
machine:
3333
image: ubuntu-2004:202104-01
@@ -73,7 +73,7 @@
7373
pytorch_cpp_doc_build:
7474
environment:
7575
BUILD_ENVIRONMENT: pytorch-cpp-doc-push
76-
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4"
76+
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4"
7777
resource_class: large
7878
machine:
7979
image: ubuntu-2004:202104-01
@@ -253,7 +253,7 @@
253253
environment:
254254
BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-build
255255
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c"
256-
PYTHON_VERSION: "3.6"
256+
PYTHON_VERSION: "3.7"
257257
resource_class: large
258258
machine:
259259
image: ubuntu-2004:202104-01
@@ -342,7 +342,7 @@
342342
environment:
343343
BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-publish-snapshot
344344
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c"
345-
PYTHON_VERSION: "3.6"
345+
PYTHON_VERSION: "3.7"
346346
resource_class: large
347347
machine:
348348
image: ubuntu-2004:202104-01
@@ -378,7 +378,7 @@
378378
environment:
379379
BUILD_ENVIRONMENT: pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-build-only-x86_32
380380
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3-clang5-android-ndk-r19c"
381-
PYTHON_VERSION: "3.6"
381+
PYTHON_VERSION: "3.7"
382382
resource_class: large
383383
machine:
384384
image: ubuntu-2004:202104-01
@@ -660,7 +660,7 @@
660660
pytorch_doc_test:
661661
environment:
662662
BUILD_ENVIRONMENT: pytorch-doc-test
663-
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.6-gcc5.4"
663+
DOCKER_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-py3.7-gcc5.4"
664664
resource_class: medium
665665
machine:
666666
image: ubuntu-2004:202104-01

.circleci/verbatim-sources/job-specs/pytorch-job-specs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ jobs:
148148
command: |
149149
set -e
150150
is_vanilla_build() {
151-
if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-bionic-py3.6-clang9-test" ]; then
151+
if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-bionic-py3.7-clang9-test" ]; then
152152
return 0
153153
fi
154-
if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-xenial-py3.6-gcc5.4-test" ]; then
154+
if [ "${BUILD_ENVIRONMENT}" == "pytorch-linux-xenial-py3.7-gcc5.4-test" ]; then
155155
return 0
156156
fi
157157
return 1

.jenkins/pytorch/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ if [[ "${BUILD_ENVIRONMENT}" == *no-ops* ]]; then
196196
export USE_PER_OPERATOR_HEADERS=0
197197
fi
198198

199-
if [[ "${BUILD_ENVIRONMENT}" == *linux-xenial-py3.6-gcc7-build* || "${BUILD_ENVIRONMENT}" == *linux-xenial-py3.6-gcc5.4-build* ]]; then
199+
if [[ "${BUILD_ENVIRONMENT}" == *linux-xenial-py3.7-gcc7-build* || "${BUILD_ENVIRONMENT}" == *linux-xenial-py3.7-gcc5.4-build* ]]; then
200200
export USE_GLOO_WITH_OPENSSL=ON
201201
fi
202202

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ that, you can install in `develop` mode again.
149149

150150
* A prerequisite to installing PyTorch is CMake. We recommend installing it with [Homebrew](https://brew.sh/)
151151
with `brew install cmake` if you are developing on MacOS or Linux system.
152-
* Our `setup.py` requires Python >= 3.6
152+
* Our `setup.py` requires Python >= 3.7
153153
* If a commit is simple and doesn't affect any code (keep in mind that some docstrings contain code
154154
that is used in tests), you can add `[skip ci]` (case sensitive) somewhere in your commit message to
155155
[skip all build / test steps](https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/).

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ You can reuse your favorite Python packages such as NumPy, SciPy, and Cython to
3939

4040
<!-- tocstop -->
4141

42-
| System | 3.6 | 3.7 | 3.8 |
43-
| :---: | :---: | :---: | :--: |
44-
| 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/) | <center>—</center> |
45-
| 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/) | <center>—</center> |
46-
| Windows CPU / GPU | <center>—</center> | [![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/) | <center>—</center> |
47-
| Linux (ppc64le) CPU | <center>—</center> | [![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/) | <center>—</center> |
48-
| Linux (ppc64le) GPU | <center>—</center> | [![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/) | <center>—</center> |
49-
| 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) |
42+
| System | 3.7 | 3.8 |
43+
| :---: | :---: | :--: |
44+
| Linux CPU | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-master/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-master/) | <center>—</center> |
45+
| Linux GPU | [![Build Status](https://ci.pytorch.org/jenkins/job/pytorch-master/badge/icon)](https://ci.pytorch.org/jenkins/job/pytorch-master/) | <center>—</center> |
46+
| 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/) | <center>—</center> |
47+
| 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/) | <center>—</center> |
48+
| 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/) | <center>—</center> |
49+
| 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) |
5050

5151
See also the [CI HUD at hud.pytorch.org](https://hud.pytorch.org/ci/pytorch/pytorch/master).
5252

@@ -167,7 +167,7 @@ They require JetPack 4.2 and above, and [@dusty-nv](https://github.com/dusty-nv)
167167

168168
### From Source
169169

170-
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.
170+
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.
171171
You will get a high-quality BLAS library (MKL) and you get controlled dependency versions regardless of your Linux distro.
172172

173173
Once you have [Anaconda](https://www.anaconda.com/distribution/#download-section) installed, here are the instructions.

cmake/Dependencies.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -1047,17 +1047,17 @@ if(BUILD_PYTHON)
10471047

10481048
# These should fill in the rest of the variables, like versions, but resepct
10491049
# the variables we set above
1050-
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION} 3.8 3.7 3.6)
1050+
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION} 3.8 3.7)
10511051
find_package(PythonInterp 3.0)
10521052
find_package(PythonLibs 3.0)
10531053

10541054
if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3)
10551055
message(FATAL_ERROR
10561056
"Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 2 has reached end-of-life and is no longer supported by PyTorch.")
10571057
endif()
1058-
if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3.6)
1058+
if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3.7)
10591059
message(FATAL_ERROR
1060-
"Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 3.5 is no longer supported by PyTorch.")
1060+
"Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 3.6 is no longer supported by PyTorch.")
10611061
endif()
10621062

10631063
# When building pytorch, we pass this in directly from setup.py, and

0 commit comments

Comments
 (0)