Pytorch 1.5.0 Version Problems

Hi all,

I wonder whether Pytorch 1.5.0 can suppport CUDA 10.0 version?
Because I install by particular version, it cannot find it.

$ sudo -H python3 -m pip install torch==1.5.0+cu100 torchvision==0.6.0+cu100 -f

Looking in links:
ERROR: Could not find a version that satisfies the requirement torch==1.5.0+cu100 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.3.0.post4, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.2.0, 1.2.0+cpu, 1.2.0+cu92, 1.3.0, 1.3.0+cpu, 1.3.0+cu100, 1.3.0+cu92, 1.3.1, 1.3.1+cpu, 1.3.1+cu100, 1.3.1+cu92, 1.4.0, 1.4.0+cpu, 1.4.0+cu100, 1.4.0+cu92, 1.5.0, 1.5.0+cpu, 1.5.0+cu101, 1.5.0+cu92)
ERROR: No matching distribution found for torch==1.5.0+cu100

Thank you.

CUDA9.2, 10.1 and 10.2 are supported as given in the installation instruction on the Get Started section.

Hi @ptrblck,

I knew. However, my CUDA version is 10.0 and I used this command below to install.

pip3 install torch==1.5.0 torchvision==0.6.0

And then I checked by this codes:

Python 3.6.9 (default, Apr 18 2020, 01:56:04) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import print_function
>>> import torch
>>> x = torch.rand(5, 3)
>>> print(x)
tensor([[0.8461, 0.7381, 0.3203],
        [0.1165, 0.6319, 0.7956],
        [0.6238, 0.5151, 0.5223],
        [0.5648, 0.0722, 0.0100],
        [0.1062, 0.3086, 0.0313]])
>>> import torch
>>> torch.cuda.is_available()

Although it worked, I was building the detectron2 repository and I got the error.

    Traceback (most recent call last):
      File "/usr/local/bin/ninja", line 11, in <module>
        load_entry_point('ninja==1.9.0.post1', 'console_scripts', 'ninja')()
      File "/usr/local/lib/python3.6/dist-packages/ninja-1.9.0.post1-py3.6-linux-x86_64.egg/ninja/", line 50, in ninja
        raise SystemExit(_program('ninja', sys.argv[1:]))
      File "/usr/local/lib/python3.6/dist-packages/ninja-1.9.0.post1-py3.6-linux-x86_64.egg/ninja/", line 46, in _program
        return[os.path.join(BIN_DIR, name)] + args)
      File "/usr/lib/python3.6/", line 287, in call
        with Popen(*popenargs, **kwargs) as p:
      File "/usr/lib/python3.6/", line 729, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.6/", line 1364, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/ninja-1.9.0.post1-py3.6-linux-x86_64.egg/ninja/data/bin/ninja'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/chieh/github/detectron2/", line 149, in <module>
        cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
      File "/home/chieh/.local/lib/python3.6/site-packages/setuptools/", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/", line 148, in setup
      File "/usr/lib/python3.6/distutils/", line 955, in run_commands
      File "/usr/lib/python3.6/distutils/", line 974, in run_command
      File "/home/chieh/.local/lib/python3.6/site-packages/setuptools/command/", line 296, in run
      File "/home/chieh/.local/lib/python3.6/site-packages/setuptools/command/", line 303, in find_sources
      File "/home/chieh/.local/lib/python3.6/site-packages/setuptools/command/", line 534, in run
      File "/home/chieh/.local/lib/python3.6/site-packages/setuptools/command/", line 570, in add_defaults
      File "/home/chieh/.local/lib/python3.6/site-packages/setuptools/command/", line 36, in add_defaults
      File "/home/chieh/.local/lib/python3.6/site-packages/setuptools/command/", line 119, in _add_defaults_ext
        build_ext = self.get_finalized_command('build_ext')
      File "/usr/lib/python3.6/distutils/", line 298, in get_finalized_command
        cmd_obj = self.distribution.get_command_obj(command, create)
      File "/usr/lib/python3.6/distutils/", line 847, in get_command_obj
        cmd_obj = self.command_obj[command] = klass(self)
      File "/home/chieh/.local/lib/python3.6/site-packages/torch/utils/", line 303, in __init__
        elif not _is_ninja_available():
      File "/home/chieh/.local/lib/python3.6/site-packages/torch/utils/", line 1192, in _is_ninja_available
        subprocess.check_call('ninja --version'.split(), stdout=devnull)
      File "/usr/lib/python3.6/", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['ninja', '--version']' returned non-zero exit status 1.
ERROR: Command errored out with exit status 1: python egg_info Check the logs for full command output.

It can successfully build on other low pytorch version.(i.e., Pytorch v1.4.0 or v1.3.1)
So I was confused whether it is the problem of pytorch version with CUDA version or not.

The error points to a PermissionError and I’m unsure, what might cause it.

However, if you building the extension with CUDA extensions, you should update your local CUDA installation to match the CUDA shipped in the PyTorch binaries.

Note, that apparently CUDA10.1 binaries for Detectron2 are available.

I will consider to install other cuda version.
Thanks for your suggestion!

(I tested again by sudo that I got the same error.)