After installing the requirements, running the render_textured_meshes.ipynb fails on the first cell with the following error:
ImportError Traceback (most recent call last)
<ipython-input-5-ce664553dc67> in <module>
8
9 # Data structures and functions for rendering
---> 10 from pytorch3d.structures import Meshes, Textures
11 from pytorch3d.renderer import (
12 look_at_view_transform,
~/PycharmProjects/pytorch3d/pytorch3d/structures/__init__.py in <module>
1 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
2
----> 3 from .meshes import Meshes
4 from .textures import Textures
5 from .utils import (
~/PycharmProjects/pytorch3d/pytorch3d/structures/meshes.py in <module>
4 import torch
5
----> 6 from pytorch3d import _C
7
8 from . import utils as struct_utils
ImportError: dlopen(/Users/semo/PycharmProjects/pytorch3d/pytorch3d/_C.cpython-37m-darwin.so, 2): Symbol not found: __Z23RasterizeMeshesFineCudaRKN2at6TensorES2_ifiib
Referenced from: /Users/semo/PycharmProjects/pytorch3d/pytorch3d/_C.cpython-37m-darwin.so
Expected in: flat namespace
in /Users/semo/PycharmProjects/pytorch3d/pytorch3d/_C.cpython-37m-darwin.so
python setup.py build develop from root directoryrender_textured_meshes.ipynbAny help is much appreciated, thanks!
@semihcanturk this looks like an error with building CUDA. Can you share more details about the environment you are using e.g. CUDA version?
I was trying to get it working on CPU only, don't have CUDA available unfortunately. INSTALL.md mentions some components have CPU implementations in C++/Pytorch as well, but I assume this particular tutorial requires GPU implementations in this case.
See also https://github.com/facebookresearch/pytorch3d/issues/29 (which is a dupe of this issue but with a different title and seen running in the tutorial colab notebooks context)
Hi,
I have cuda 10.0 and t trying to build the package with "python setup.py install --user". I am getting the save error for "from pytorch3d.structures import Meshes".
@sinanmut @REscanDon @semihcanturk I am looking into this and will report back soon.
@sinanmut your issue is now resolved. @semihcanturk we are making some changes so the library can be built for cpu only. We will try to get this fixed ASAP. In the meantime please see #29 for instructions on how to run the tutorials in a collab environment.
@semihcanturk a fix has been landed in master so please try again with the latest version of the repo. If you still experience problems feel free to reopen this issue.
I don't have any errors any more, thanks a lot!
I'm afraid the issue persists on my end. Reinstalled the latest master via pip3 install git+https://github.com/facebookresearch/pytorch3d.git, and the error is very much the same, except the last section:
ImportError: dlopen(/Users/semo/PycharmProjects/pytorch3d/pytorch3d/_C.cpython-37m-darwin.so, 2): Symbol not found: __Z23RasterizeMeshesFineCudaRKN2at6TensorES2_ifiib
Referenced from: /Users/semo/PycharmProjects/pytorch3d/pytorch3d/_C.cpython-37m-darwin.so
Expected in: flat namespace
in /Users/semo/PycharmProjects/pytorch3d/pytorch3d/_C.cpython-37m-darwin.so
has been replaced by this simpler message:
ImportError: cannot import name '_C' from 'pytorch3d' (/Users/semo/PycharmProjects/pytorch3d/pytorch3d/__init__.py)
Can you reopen the issue? Thanks!
@semihcanturk can you try doing import torch before importing pytorch3d?
That is how it is right now. I also tried moving import torch to a cell above the one that imports pytorch3d and ran the cells sequentially, but neither case worked.
@semihcanturk it seems PyTorch3D was not installed properly. Did you try pip uninstall and reinstalling?
yup. tried uninstall/installing both the default pip install pytorch3d (v 0.0.1) and the latest master via pip install git+https://github.com/facebookresearch/pytorch3d.git (v 0.1), but the issue remains.
oh, my apologies - I think the issue arose from the cloned repo (where the tutorials are) rather than the installed pytorch3d package. It seems to be resolved now that I ran python3 setup.py build develop on the repository root.
I have, however, encountered a new one in RuntimeError: Not implemented on the CPU. Will file it under a separate issue though as it is not directly related to the one in the title.
ok great! I will close this issue!