Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1145 Discussions

not able to import torch when connected to IntelDevCloud using Jupyter notebook

idata
Community Manager
2,441 Views

Please help me regarding how to import torch

0 Kudos
8 Replies
idata
Community Manager
903 Views

Hello,

 

 

Thanks for reaching out to us.

 

 

First create a virtual environment using the below command

 

conda create -n -c intel python=2 pip numpy source activate

 

 

Command to install pytorch

 

conda install pytorch-cpu torchvision -c pytorch

 

 

Go to python shell and import using the command

 

import torch  Thanks, Dilraj
idata
Community Manager
903 Views

Thanks for the guide line....but will you please make it clear where (which prompt) to form the virtual environment

idata
Community Manager
903 Views

Hello,

 

 

In the terminal please give the below command

 

 

conda create -n Vaidehi -c intel python=2 pip numpy  Virtual Name : Vaidehi  Thanks, Dilraj
idata
Community Manager
903 Views

Thank you!!! it worked...

idata
Community Manager
903 Views

I could instal pytorch using steps you gave.

But import torch still did not work in jupyter notebook, it worked though on python shell accessed under virtual environment

one more doubt regarding jupyter:

how to save and submit script file prepared using jupyter ?

idata
Community Manager
903 Views

Hello,

 

 

Please find the details

 

 

source activate  conda install ipykernel ipython kernel install --name --user

 

 

Once this is done, launch your python code from hub.colfaxresearch.com

 

Select Kernel -> Change Kernel ->

 

 

Do try out and check if this works!

 

 

Thanks,

 

Dilraj
idata
Community Manager
903 Views

Hello,

 

 

We did not receive any response, so we are closing the case for now.

 

 

Thanks,

 

Dilraj
idata
Community Manager
903 Views

Thanks, it worked....it didn't give me any error when i imported pytorch from jupyter notebook

Reply