I am on my Linux Ubuntu 20 machine, and I just finished to run a 12hours
conda install -c pytorch pytorch=1.7.0 torchvision cudatoolkit=10.2 on a previous environment.
I am having this error, I saw similar issues also on Detectron2 and MaskRCNN repositories.
ImportError Traceback (most recent call last)
<ipython-input-4-e9b081137cde> in <module>
----> 1 from pytorch3d.structures import Meshes
~/anaconda3/envs/pytorch3d/lib/python3.8/site-packages/pytorch3d/structures/__init__.py in <module>
2
3 from .meshes import Meshes, join_meshes_as_batch, join_meshes_as_scene
----> 4 from .pointclouds import Pointclouds
5 from .utils import list_to_packed, list_to_padded, packed_to_list, padded_to_list
6
~/anaconda3/envs/pytorch3d/lib/python3.8/site-packages/pytorch3d/structures/pointclouds.py in <module>
3 import torch
4
----> 5 from .. import ops
6 from . import utils as struct_utils
7
~/anaconda3/envs/pytorch3d/lib/python3.8/site-packages/pytorch3d/ops/__init__.py in <module>
3 from .cameras_alignment import corresponding_cameras_alignment
4 from .cubify import cubify
----> 5 from .graph_conv import GraphConv
6 from .interp_face_attrs import interpolate_face_attributes
7 from .knn import knn_gather, knn_points
~/anaconda3/envs/pytorch3d/lib/python3.8/site-packages/pytorch3d/ops/graph_conv.py in <module>
6
7 # pyre-fixme[21]: Could not find name `_C` in `pytorch3d`.
----> 8 from pytorch3d import _C
9 from torch.autograd import Function
10 from torch.autograd.function import once_differentiable
ImportError: /home/alberto/anaconda3/envs/pytorch3d/lib/python3.8/site-packages/pytorch3d/_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104impl23ExcludeDispatchKeyGuardC1ENS_11DispatchKeyE
Also after running conda install -c conda-forge -c fvcore fvcore the issue persist.
I am having issues also in new conda environment created from scratch.
I can see _C.cpython-38-x86_64-linux-gnu.so there

I did pip install "torch<1.7" and solved the issue, it seems there are some issues with pytorch 1.7
Thank you for this!
Most helpful comment
I did
pip install "torch<1.7"and solved the issue, it seems there are some issues withpytorch 1.7