diff --git a/.github/scripts/setup-env.sh b/.github/scripts/setup-env.sh index 8bb61789cdf..e1c5855f31c 100755 --- a/.github/scripts/setup-env.sh +++ b/.github/scripts/setup-env.sh @@ -80,22 +80,8 @@ if [[ $GPU_ARCH_TYPE == 'cuda' ]]; then fi echo '::endgroup::' -echo '::group::Install third party dependencies prior to TorchVision install' -# Installing with `easy_install`, e.g. `python setup.py install` or `python setup.py develop`, has some quirks when -# when pulling in third-party dependencies. For example: -# - On Windows, we often hit an SSL error although `pip` can install just fine. -# - It happily pulls in pre-releases, which can lead to more problems down the line. -# `pip` does not unless explicitly told to do so. -# Thus, we use `easy_install` to extract the third-party dependencies here and install them upfront with `pip`. -python setup.py egg_info -# The requires.txt cannot be used with `pip install -r` directly. The requirements are listed at the top and the -# optional dependencies come in non-standard syntax after a blank line. Thus, we just extract the header. -sed -e '/^$/,$d' *.egg-info/requires.txt | tee requirements.txt -pip install --progress-bar=off -r requirements.txt -echo '::endgroup::' - echo '::group::Install TorchVision' -python setup.py develop +pip install -e . -v --no-build-isolation echo '::endgroup::' echo '::group::Install torchvision-extra-decoders' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b76b420c2c0..d3cc923e268 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,11 +58,11 @@ details. ```bash git clone https://github.com/pytorch/vision.git cd vision -python setup.py develop # use install instead of develop if you don't care about development. +pip install -e . -v --no-build-isolation # leave out the -e switch if you don't care about development. # or, for OSX -# MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py develop +# MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ pip install -e . -v --no-build-isolation # for C++ debugging, use DEBUG=1 -# DEBUG=1 python setup.py develop +# DEBUG=1 pip install -e . -v --no-build-isolation ``` By default, GPU support is built if CUDA is found and `torch.cuda.is_available()` is true. It's possible to force diff --git a/README.md b/README.md index 1076a7a186d..2d6361fab0d 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Torchvision currently supports the following video backends: ``` conda install -c conda-forge 'ffmpeg<4.3' -python setup.py install +pip install . -v --no-build-isolation ``` # Using the models on C++ diff --git a/torchvision/csrc/io/decoder/gpu/README.rst b/torchvision/csrc/io/decoder/gpu/README.rst index cebd31cb557..e4573d7fe75 100644 --- a/torchvision/csrc/io/decoder/gpu/README.rst +++ b/torchvision/csrc/io/decoder/gpu/README.rst @@ -18,4 +18,4 @@ GPU decoder depends on ffmpeg for demuxing, uses NVDECODE APIs from the nvidia-v .. code:: bash - python setup.py install + pip install . -v --no-build-isolation