Trying to install Pytorch from local package

NoamAS: <p>Hi everyone .</p>
<p>I’m now here . Glad I found this community .</p>
<p>**Note - Due to proxy stuff I can only download packages and install them locally . I can’t use direct URL with pip .<br>
Note 2 - I’m using Windows server 2012r 64bit . Linux is not an option , even not virtual machine . **</p>
<p>I’m trying to use CNTK along with Pytorch . As a first step I installed Anaconda version 5.2.0 and Python 3.6 (I need those specific versions) . Next I installed CNTK cntk_gpu-2.7.post1-cp36-cp36m-win_amd64.whl</p>
<p>Next I have installed msgpack-0.6.2-cp36-cp36m-win_amd64.whl</p>
<p>Finally I have tried to install pytorch 1.0.2.gz</p>
<p>msgpack &amp; pytorch were downloaded from <a href="https://pypi.org/" rel="nofollow noopener">https://pypi.org/</a> ( On the official pytorch site I couldn’t find files to download other than the exact command to use for installation (Which refers to URL installation).</p>
<p>When I’m trying to install pytorch with the following command :</p>
<p>“pip install torch-1.0.2.tar.gz” I’m getting the following error :<br>
**D:\TEMP\CNTK-PYTORCH&gt;pip install torch-1.0.2.tar.gz<br>
Processing d:\temp\cntk-pytorch\torch-1.0.2.tar.gz<br>
Building wheels for collected packages: pytorch<br>
Running setup.py bdist_wheel for pytorch … error<br>
Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c “import setuptools, tokenize;<strong>file</strong>=‘C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\setup.py’;f=getattr(token<br>
.close();exec(compile(code, <strong>file</strong>, ‘exec’))” bdist_wheel -d C:\Users\ilq01041\AppData\Local\Temp\2\pip-wheel-34es8swd --python-tag cp36:<br>
Traceback (most recent call last):<br>
File “”, line 1, in <br>
File “C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\setup.py”, line 15, in <br>
raise Exception(message)<br>
Exception: You tried to install “pytorch”. The package named for PyTorch is “torch”</p>
<hr>
<p>Failed building wheel for pytorch<br>
Running setup.py clean for pytorch<br>
Failed to build pytorch<br>
Installing collected packages: pytorch<br>
Running setup.py install for pytorch … error<br>
Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c “import setuptools, tokenize;<strong>file</strong>=‘C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\setup.py’;f=getattr(tok<br>
;f.close();exec(compile(code, <strong>file</strong>, ‘exec’))” install --record C:\Users\ilq01041\AppData\Local\Temp\2\pip-record-p5gk89v6\install-record.txt --single-version-externally-managed --compile:<br>
Traceback (most recent call last):<br>
File “”, line 1, in <br>
File “C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\setup.py”, line 11, in <br>
raise Exception(message)<br>
Exception: You tried to install “pytorch”. The package named for PyTorch is “torch”</p>
<pre><code>----------------------------------------
</code></pre>
<p>Command “C:\ProgramData\Anaconda3\python.exe -u -c “import setuptools, tokenize;<strong>file</strong>=‘C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\setup.py’;f=getattr(tokenize, ‘open’, open)(__f<br>
code, <strong>file</strong>, ‘exec’))” install --record C:\Users\ilq01041\AppData\Local\Temp\2\pip-record-p5gk89v6\install-record.txt --single-version-externally-managed --compile” failed with error code 1 in C:\Users\il**</p>
<p>Thank you in advance !</p>

ptrblck: <p>I guess you might have downloaded <a href="https://pypi.org/project/pytorch/" rel="nofollow noopener">this dummy pip package</a>.<br>
Could you try to download the matching wheel from <a href="https://download.pytorch.org/whl/cpu/torch_stable.html" rel="nofollow noopener">here</a> and try to install it again?</p>

NoamAS: <p>Thx ! I have been looking for WHL  file but couldn’t find it . How did you even find it in pytorch site ? Just wondering .</p>

ptrblck: <p>I just went to the <a href="https://pytorch.org/get-started/previous-versions/" rel="nofollow noopener">previous PyTorch versions</a> and looked for the URLs. <img src="https://discuss.pytorch.org/images/emoji/apple/wink.png?v=9" title=":wink:" class="emoji" alt=":wink:"></p>

NoamAS: <p>Thx !</p>
<p>Do you have any suggestions on how to do a sanity check to make sure PYTORCH works fine with CNTK  ?</p>
<p>Thx !</p>

ptrblck: <p>Could you explain your use case a bit more?<br>
How would you like to use PyTorch with CNTK?</p>

NoamAS: <p>Hi<br>
Sorry for the very long time I didn’t respond<br>
Honestly I don’t know the answer exactly . I have requested to install it for someone else and make sure they both work together . I just not sure how to make sure they do .<br>
Maybe I can use some example data or something ?</p>
<p>Thx !</p>

ptrblck: <p>You could try to run some code from our <a href="https://pytorch.org/tutorials/">tutorials</a> to make sure PyTorch is working correctly.<br>
A quick sanity check would be:</p>
<pre><code class="lang-python">import torch
print(torch.__version__)
print(torch.randn(1, device='cuda'))
</code></pre>
<p>to make sure you can use the GPU properly.</p>

NoamAS: <p>Thank you very much !<br>
Do you by any chance know if ptyorch can work in parallel to CNTK ?</p>
<p>Thx .</p>

ptrblck: <p>What do you mean by “in parallel”?<br>
As a side note, CNTK might not get any new releases anymore (based on this <a href="https://github.com/Microsoft/CNTK">GitHub</a> comment):</p>
<blockquote>
<p>Today’s 2.7 release will be the last main release of CNTK. We may have some subsequent minor releases for bug fixes, but these will be evaluated on a case-by-case basis. There are no plans for new feature development post this release.</p>
</blockquote>

NoamAS: <p>Hi . Yes I know , that is the reason for checking pytorch . As a first step we want to make sure both can work together , meaning both installed on the same system and won’t interrupt each other . That’s the reason I want to make sure both can be installed .<br>
I have tried the test you wrote above . I just changed from “CUDA” to “cpu” because for now I don’t have GPU but will in the near future . As soon as I have a machine with GPU I will install the one that support GPU  ,</p>
<p>After I ececuted the test I got the following output . Not sure what it means (I don’t have any knowledge in that specific field .I’m just doing the technical stuff ) :</p>
<p>print(torch.randn(1, device= ‘cpu’))<br>
tensor([0.1284])</p>
<p>I appreciate all your help and patience !</p>

ptrblck: <p>The output means that a random tensor was successfully created on the CPU.</p>
<p>If you would like to make sure both frameworks work on a machine without interference, I would suggest to use virtual conda environments.</p>

NoamAS: <aside class="quote no-group" data-username="ptrblck" data-post="12" data-topic="57343">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/48/1823_2.png" class="avatar"> ptrblck:</div>
<blockquote>
<p>virtual conda environments</p>
</blockquote>
</aside>
<p>Thank you . That’s what I’m going to try .</p>