Salamander import error, _C symbol

Hello I am having this error when importing the 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 import *
      2 from fastai.metrics import error_rate

~/anaconda3/lib/python3.7/site-packages/fastai/vision/ 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/ 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/ 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/ 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/ in <module>
      9 from .shufflenetv2 import *
     10 from . import segmentation
---> 11 from . import detection

~/anaconda3/lib/python3.7/site-packages/torchvision/models/detection/ 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/ in <module>
      5 import torch.nn.functional as F
----> 7 from torchvision.ops import misc as misc_nn_ops
      8 from torchvision.ops import MultiScaleRoIAlign

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

ImportError: /home/ubuntu/anaconda3/lib/python3.7/site-packages/torchvision/ undefined symbol: _ZN2at7getTypeERKNS_6TensorE
1 Like

Im getting the same error while importing libraries
ImportError: /home/ubuntu/anaconda3/lib/python3.7/site-packages/torchvision/ undefined symbol: _ZN2at7getTypeERKNS_6TensorE

I’m also getting this error

I am getting the exact same error.

And me.

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

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

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

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

I’m also seeing this error.

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.

Yes without upgrading the library, It works, Thanks,

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

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.


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

1 Like

With Salamander how do you create new instance?

“Design Another Server” from the Salamander dashboard. Remember to stop or destroy existing servers to control your costs.

Hi Jeremy, just checking in to see if there have been any updates with regards to this. Would love to use Salamander if possible since Colab requires some extra steps to save my work

It seems like I can run “from fastai import *” just fine but when I run “from import *” it gives me the import error

I think I’ve figured out the problem. I had to install nvidia-ml-py3 first because I was getting the message that it wasn’t installed when I tried to upgrade torchvision. After that the fastai library imported correctly.

%reload_ext autoreload
%autoreload 2
%matplotlib inline

!pip install nvidia-ml-py3

!pip install torchvision --upgrade

from fastai import *
from import *
1 Like