Undefined: PySlice_AdjustIndices when importing PyTorch

I'm trying to use PyTorch, and I think there is some version of something that doesn't line up.

From the fact that I can tell a little, it seems that in the newest version of PyTorch (?) There are some functions that cannot be obtained on my system. I suspect this has something to do with Python version 3.6.1, not 3.6.0. But I canโ€™t understand. If anyone has any tips on what I can do to fix this error:

/home/ubuntu/nbs/torch_utils.py in <module>() ----> 1 import torch 2 import torch.nn as nn 3 import torch.nn.parallel 4 import torch.utils.data 5 from torch import optim /home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/__init__.py in <module>() 51 sys.setdlopenflags(_dl_flags.RTLD_GLOBAL | _dl_flags.RTLD_NOW) 52 ---> 53 from torch._C import * 54 55 __all__ += [name for name in dir(_C) ImportError: /home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PySlice_AdjustIndices 

Here are the details on my system:

I am running Ubuntu on AWS, Ubuntu 16.04.2 LTS

my info is Cuda Cuda compilation tools, release 8.0, V8.0.61

I have Anaconda, conda 4.3.15

My python version of Python 3.6.0 :: Anaconda custom (64-bit)

Thanks.

+5
source share
2 answers

I have the same problem, maybe the assembly is broken for Ubuntu / Python 3.6.

In any case, until they fix this problem, you can install PyTorch by downgrading one version:

conda install pytorch=0.1.10 torchvision -c soumith

This version works great in all my tests.

+5
source

this is now fixed if you reinstall pytorch via conda:

conda install pytorch torchvision -c soumith

+2
source

Source: https://habr.com/ru/post/1266091/


All Articles