autonomousvision / occupancy_networks

This repository contains the code for the paper "Occupancy Networks - Learning 3D Reconstruction in Function Space"
https://avg.is.tuebingen.mpg.de/publications/occupancy-networks
MIT License
1.5k stars 292 forks source link

compile #8

Closed xiayizhan2017 closed 5 years ago

xiayizhan2017 commented 5 years ago

I run python3 generate.py configs/demo.yaml I get import error : /im2mesh/dmc/ops/_cuda_ext.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZN2atErrorCLENS_14SourceLocationERKSs

andrewayres commented 5 years ago

I'm getting something similar when running python generate.py configs/demo.yaml

ImportError: dlopen(/Users/{my username}/anaconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torchvision/_C.cpython-36m-darwin.so, 2): Symbol not found: __ZN2at19NonVariableTypeMode10is_enabledEv
  Referenced from: /Users/{my username}/anaconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torchvision/_C.cpython-36m-darwin.so
  Expected in: flat namespace
 in /Users/{my username}/anaconda3/envs/mesh_funcspace/lib/python3.6/site-packages/torchvision/_C.cpython-36m-darwin.so

How do I fix this?

JiamingSuen commented 5 years ago

This is usually caused by environment version changes(e.g. python/pytorch version) after library compilation. You may try to delete the compiled binaries and run python setup.py build_ext --inplace again.

xiayizhan2017 commented 5 years ago

@JiamingSuen Thank you for your answer, but I don't understand the environmental version change.

andrewayres commented 5 years ago

could you say what version of PyTorch and CUDA this code works with? I've tried by deleting all build and cache files and compiling Pytorch (and torchvision) from source, and using both clang/clang++ and gcc/g++ on MacOS 10.13.6 with CUDA 10.0 but always get the above 'symbol not found' error when trying to run generate.py