How to use pytorch 1.7.0+cu110 from Pycharm

akuysal: <p>I have a previous code written using python 3.7 and torch 1.7.0+cu110 . Now, I can not execute it with another computer having GPU. I can not install it from the repository and I am getting these kind of errors.</p>
<p>ERROR: Could not find a version that satisfies the requirement torch==1.7.0+cu110 (from versions: 2.0.0, 2.0.0+cpu, 2.0.0+cu117, 2.0.0+cu118, 2.0.1, 2.0.1+cpu, 2.0.1+cu117, 2.0.1+cu118, 2.1.0, 2.1.0+cpu, 2.1.0+cu118, 2.1.0+cu121<br>
, 2.1.1, 2.1.1+cpu, 2.1.1+cu118, 2.1.1+cu121, 2.1.2, 2.1.2+cpu, 2.1.2+cu118, 2.1.2+cu121, 2.2.0, 2.2.0+cpu, 2.2.0+cu118, 2.2.0+cu121, 2.2.1, 2.2.1+cpu, 2.2.1+cu118, 2.2.1+cu121)<br>
ERROR: No matching distribution found for torch==1.7.0+cu110</p>
<p>Then, I downloaded a whl file in order to install from the local directory. However, I am still getting the following error:</p>
<p>ERROR: torch-1.7.0+cu110-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.</p>
<p>Is there anyone recommending doing something else?</p>

HfCloud: <p>I think you can install torch1.7.0+cu110 by conda instead of pip</p>
<pre><code class="lang-auto">conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch
</code></pre>
<p>See <a href="https://pytorch.org/get-started/previous-versions/" class="inline-onebox" rel="noopener nofollow ugc">Previous PyTorch Versions | PyTorch</a></p>

akuysal: <p>I tried to do it. Actually, I think there is another problem. In Pycharm terminal window, when I check the Python version it is 3.7 but conda package thinks that Python version is 3.11 and it says there are some inconsistencies. I saw the following outputs after executing the previous conda install command.</p>
<p>UnsatisfiableError: The following specifications were found<br>
to be incompatible with the existing python installation in your environment:</p>
<p>Specifications:</p>
<ul>
<li>pytorch==1.7.0 → python[version=‘&gt;=3.6,&lt;3.7.0a0|&gt;=3.7,&lt;3.8.0a0|&gt;=3.8,&lt;3.9.0a0’]</li>
<li>torchaudio==0.7.0 → python[version=‘&gt;=3.6,&lt;3.7.0a0|&gt;=3.7,&lt;3.8.0a0|&gt;=3.8,&lt;3.9.0a0’]</li>
<li>torchvision==0.8.0 → python[version=‘&gt;=3.6,&lt;3.7.0a0|&gt;=3.7,&lt;3.8.0a0|&gt;=3.8,&lt;3.9.0a0’]</li>
</ul>
<p>Your python: python=3.11</p>
<p>If python is on the left-most side of the chain, that’s the version you’ve asked for.<br>
When python appears to the right, that indicates that the thing on the left is somehow<br>
not available for the python version you are constrained to. Note that conda will not<br>
change your python version to a different minor version unless you explicitly specify<br>
that.</p>
<p>The following specifications were found to be incompatible with each other:</p>
<p>Output in format: Requested package → Available versions</p>
<p>Package numpy-base conflicts for:<br>
pytorch==1.7.0 → numpy[version=‘&gt;=1.11’] → numpy-base[version=‘1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.<br>
11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.14.3|1.14.3|<br>
…<br>
…<br>
Package vc conflicts for:<br>
torchaudio==0.7.0 → python[version=’&gt;=3.7,&lt;3.8.0a0’] → vc=14<br>
python=3.11 → vc[version=‘&gt;=14.1,&lt;15.0a0’]<br>
torchvision==0.8.0 → cudatoolkit[version=‘&gt;=11.0,&lt;11.1’] → vc[version=‘14.<em>|&gt;=14.1,&lt;15.0a0|9.</em>|&gt;=14.2,&lt;15.0a0’]<br>
torchaudio==0.7.0 → vc[version=‘&gt;=14.1,&lt;15.0a0’]<br>
python=3.11 → bzip2[version=‘&gt;=1.0.8,&lt;2.0a0’] → vc=9<br>
pytorch==1.7.0 → cudatoolkit[version=‘&gt;=11.0,&lt;11.1’] → vc[version=‘14.<em>|9.</em>|&gt;=14.1,&lt;15.0a0|&gt;=14.2,&lt;15.0a0’]<br>
cudatoolkit=11.0 → vc[version=‘&gt;=14.1,&lt;15.0a0’]</p>
<p>Package zlib conflicts for:<br>
torchvision==0.8.0 → libpng → zlib[version=‘&gt;=1.2.11,&lt;1.3.0a0|&gt;=1.2.13,&lt;1.3.0a0’]<br>
python=3.11 → zlib[version=‘&gt;=1.2.13,&lt;1.3.0a0’]</p>
<p>Package cudatoolkit conflicts for:<br>
pytorch==1.7.0 → cudatoolkit[version=‘&gt;=10.1,&lt;10.2|&gt;=11.0,&lt;11.1|&gt;=10.2,&lt;10.3’]</p>
<p>Package vs2015_runtime conflicts for:<br>
cudatoolkit=11.0 → vc[version=‘&gt;=14.1,&lt;15.0a0’] → vs2015_runtime[version=‘&gt;=14.15.26706|&gt;=14.27.29016|&gt;=14.16.27012’]<br>
cudatoolkit=11.0 → vs2015_runtime[version=‘&gt;=14.16.27012,&lt;15.0a0’]</p>
<p>Package pytorch conflicts for:<br>
torchvision==0.8.0 → pytorch==1.7.0<br>
torchaudio==0.7.0 → pytorch==1.7.0</p>

ptrblck: <p>I wanted to also point towards the used Python version. Based on your last post, it seems you are using 3.11 so would need to downgrade as this older PyTorch build might not have supported 3.11 yet.</p>