Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
1,631 Views

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

Please help me regarding how to import torch

Tags (1)
0 Kudos
8 Replies
Highlighted
Community Manager
93 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
0 Kudos
Highlighted
Community Manager
93 Views

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

0 Kudos
Highlighted
Community Manager
93 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
0 Kudos
Highlighted
Community Manager
93 Views

Thank you!!! it worked...

0 Kudos
Highlighted
Community Manager
93 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 ?

0 Kudos
Highlighted
Community Manager
93 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
0 Kudos
Highlighted
Community Manager
93 Views

Hello,

 

 

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

 

 

Thanks,

 

Dilraj
0 Kudos
Highlighted
Community Manager
93 Views

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

0 Kudos