Salamander fastai.vision import error, _C symbol

(jamiey123) #1

Hello I am having this error when importing the fastai.vision library that is presented within the jupyter notebook for the salamander setup. I just ran what was on there and this happened.

Seems like the import issue is at this “from torchvision import _C”

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-283c0d40bede> in <module>
----> 1 from fastai.vision import *
      2 from fastai.metrics import error_rate

~/anaconda3/lib/python3.7/site-packages/fastai/vision/__init__.py in <module>
      1 from .. import basics
      2 from ..basics import *
----> 3 from .learner import *
      4 from .image import *
      5 from .data import *

~/anaconda3/lib/python3.7/site-packages/fastai/vision/learner.py in <module>
      4 from ..basic_data import *
      5 from .image import *
----> 6 from . import models
      7 from ..callback import *
      8 from ..layers import *

~/anaconda3/lib/python3.7/site-packages/fastai/vision/models/__init__.py in <module>
      1 from .xresnet import *
----> 2 from torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152
      3 from torchvision.models import SqueezeNet,squeezenet1_0,squeezenet1_1
      4 from torchvision.models import densenet121,densenet169,densenet201,densenet161
      5 from torchvision.models import vgg16_bn,vgg19_bn,alexnet

~/anaconda3/lib/python3.7/site-packages/torchvision/__init__.py in <module>
----> 1 from torchvision import models
      2 from torchvision import datasets
      3 from torchvision import ops
      4 from torchvision import transforms
      5 from torchvision import utils

~/anaconda3/lib/python3.7/site-packages/torchvision/models/__init__.py in <module>
      9 from .shufflenetv2 import *
     10 from . import segmentation
---> 11 from . import detection

~/anaconda3/lib/python3.7/site-packages/torchvision/models/detection/__init__.py in <module>
----> 1 from .faster_rcnn import *
      2 from .mask_rcnn import *
      3 from .keypoint_rcnn import *

~/anaconda3/lib/python3.7/site-packages/torchvision/models/detection/faster_rcnn.py in <module>
      5 import torch.nn.functional as F
      6 
----> 7 from torchvision.ops import misc as misc_nn_ops
      8 from torchvision.ops import MultiScaleRoIAlign
      9 

~/anaconda3/lib/python3.7/site-packages/torchvision/ops/__init__.py in <module>
----> 1 from .boxes import nms, box_iou
      2 from .roi_align import roi_align, RoIAlign
      3 from .roi_pool import roi_pool, RoIPool
      4 from .poolers import MultiScaleRoIAlign
      5 from .feature_pyramid_network import FeaturePyramidNetwork

~/anaconda3/lib/python3.7/site-packages/torchvision/ops/boxes.py in <module>
      1 import torch
----> 2 from torchvision import _C
      3 
      4 
      5 def nms(boxes, scores, iou_threshold):

ImportError: /home/ubuntu/anaconda3/lib/python3.7/site-packages/torchvision/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at7getTypeERKNS_6TensorE
1 Like

Platform: Salamander ✅
(Taranpreet) #2

Im getting the same error while importing libraries
ImportError: /home/ubuntu/anaconda3/lib/python3.7/site-packages/torchvision/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at7getTypeERKNS_6TensorE

0 Likes

(Valentin Doychinov) #3

I’m also getting this error

0 Likes

(Minh) #4

I am getting the exact same error.

0 Likes

(Paul Bradshaw) #5

And me.

0 Likes

(Minh) #6

Guys, I solved the problem this morning just by creating a new instance. Maybe it will work for you too.

0 Likes

(jamiey123) #7

I’ve tried updating the fastai package in conda.

conda update fastai

as well as deleting the Salamander server instance and repeating the installation steps with as per the instructions in the setup to no avail. The error keeps presenting itself.

Not sure what else to try. Any suggestions ?

1 Like

(jamiey123) #8

I gave up with salamander and just used the colab option, everything ran fine there with no problem. It is also free , I’d suggest trying that one

0 Likes

(Taranpreet) #9

Same for me, No use of creating a new Instance, Such a waste of time Salamander is

0 Likes

#10

I’m also seeing this error.

0 Likes

(Minh) #11

Did you try just create a new instance and NOT update fastai or pytorch? I mean just create a new instance and jump straight to a jupyter notebook and try importing the library again. I used this method and it worked wonder.

0 Likes

(Taranpreet) #12

Yes without upgrading the library, It works, Thanks,

0 Likes

(Jessica) #13

I’m also having this issue and have tried creating a new instance and importing the library again.

0 Likes

(Jeremy Howard (Admin)) #14

I wonder if it’s related to the new PyTorch 1.2 release. I’ll try to create a new template with pytorch 1.2 in the next couple of days.

1 Like

(Gamal Abdulsalam) #15

Im also getting the same error and honestly it is so frustrating .-., cant get past the first assignment.

0 Likes

(carey) #16

With Salamander how do you create new instance?

0 Likes