Problems after installing pytorch on windows

I have installed pytorch in a conda environment using

conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

However after that I try doing import torch
and I get the following error

Microsoft Visual C++ Redistributable is not installed, this may lead to the DLL load failure.  
It can be downloaded at                                 
Traceback (most recent call last):                                                                                       
 File "<stdin>", line 1, in <module>                                                                                     
File "C:\Users\aliag\anaconda3\envs\pytorchPractice\lib\site-packages\torch\", line 127, in <module>           
raise err                                                                                                           
OSError: [WinError 126] 指定されたモジュールが見つかりません。 
Error loading "C:\Users\aliag\anaconda3\envs\pytorchPractice\lib\site-packages\torch\lib\asmjit.dll" 
or one of its dependencies.                                                 

I would really appreciate some help to correct this problem

I found the solution. I had not adequately installed CUDA. When I did it again, the problem dissapears

@KansaiUser, I’m having the same problem. Can you discuss in detail how you solved it?

Bumping this up

Does anyone have a clear solution to this issue? I faced this when I updated from 1.5.0 to 1.6.0 and soon after that doing a fresh install in a new environment. I already have a couple of versions of Visual C++ Redistributable installed (2013 and 2017).

Answering my own question: the situation was set right when I installed the Redistributable that’s linked in the error message. However, I don’t understand why the existing ones didn’t work. Also, if this is an requirement that’s not available as part of a conda repository, why is this not mentioned as part of the installation steps?