Trying to install Pytorch from local package

Hi everyone .

I’m now here . Glad I found this community .

**Note - Due to proxy stuff I can only download packages and install them locally . I can’t use direct URL with pip .
Note 2 - I’m using Windows server 2012r 64bit . Linux is not an option , even not virtual machine . **

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

Next I have installed msgpack-0.6.2-cp36-cp36m-win_amd64.whl

Finally I have tried to install pytorch 1.0.2.gz

msgpack & pytorch were downloaded from ( 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).

When I’m trying to install pytorch with the following command :

“pip install torch-1.0.2.tar.gz” I’m getting the following error :
**D:\TEMP\CNTK-PYTORCH>pip install torch-1.0.2.tar.gz
Processing d:\temp\cntk-pytorch\torch-1.0.2.tar.gz
Building wheels for collected packages: pytorch
Running bdist_wheel for pytorch … error
Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\’;f=getattr(token
.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d C:\Users\ilq01041\AppData\Local\Temp\2\pip-wheel-34es8swd --python-tag cp36:
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\”, line 15, in
raise Exception(message)
Exception: You tried to install “pytorch”. The package named for PyTorch is “torch”

Failed building wheel for pytorch
Running clean for pytorch
Failed to build pytorch
Installing collected packages: pytorch
Running install for pytorch … error
Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\’;f=getattr(tok
;f.close();exec(compile(code, file, ‘exec’))” install --record C:\Users\ilq01041\AppData\Local\Temp\2\pip-record-p5gk89v6\install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\”, line 11, in
raise Exception(message)
Exception: You tried to install “pytorch”. The package named for PyTorch is “torch”


Command “C:\ProgramData\Anaconda3\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\ilq01041\AppData\Local\Temp\2\pip-req-build-_holoowl\’;f=getattr(tokenize, ‘open’, open)(__f
code, file, ‘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**

Thank you in advance !

I guess you might have downloaded this dummy pip package.
Could you try to download the matching wheel from here and try to install it again?

1 Like

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

I just went to the previous PyTorch versions and looked for the URLs. :wink:

Thx !

Do you have any suggestions on how to do a sanity check to make sure PYTORCH works fine with CNTK ?

Thx !

Could you explain your use case a bit more?
How would you like to use PyTorch with CNTK?

Sorry for the very long time I didn’t respond
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 .
Maybe I can use some example data or something ?

Thx !

You could try to run some code from our tutorials to make sure PyTorch is working correctly.
A quick sanity check would be:

import torch
print(torch.randn(1, device='cuda'))

to make sure you can use the GPU properly.

Thank you very much !
Do you by any chance know if ptyorch can work in parallel to CNTK ?

Thx .

What do you mean by “in parallel”?
As a side note, CNTK might not get any new releases anymore (based on this GitHub comment):

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.

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 .
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 ,

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 ) :

print(torch.randn(1, device= ‘cpu’))

I appreciate all your help and patience !

The output means that a random tensor was successfully created on the CPU.

If you would like to make sure both frameworks work on a machine without interference, I would suggest to use virtual conda environments.

Thank you . That’s what I’m going to try .