occupancy_flow icon indicating copy to clipboard operation
occupancy_flow copied to clipboard

Some minor installation errors

Open mjkmoynihan opened this issue 3 years ago • 4 comments

Thanks for sharing your code, the paper is really interesting. I hope to use it for future work and cite it!

I'm mostly posting this for visibility due to some issues that had occurred during setup and how I fixed them in my case:

On Ubuntu 20.04 with Anaconda 4.10.1,

during python setup.py build_ext --inplace we get the following ouput:

Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    from torch.utils.cpp_extension import BuildExtension
  File "/home/matt/anaconda3/envs/oflow/lib/python3.6/site-packages/torch/__init__.py", line 84, in <module>
    from torch._C import *
ImportError: /home/matt/anaconda3/envs/oflow/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined symbol: cblas_sgemm_alloc

For some reason pytorch doesn't install correctly so this can be solved with pip install torch==1.0.0.

And in setup.py include_dirs=[numpy_include_dir] needs to be added to each extension that requires numpy as it doesn't seem to find it otherwise.

mjkmoynihan avatar May 20 '21 14:05 mjkmoynihan

Thanks for sharing your code, the paper is really interesting. I hope to use it for future work and cite it!

I'm mostly posting this for visibility due to some issues that had occurred during setup and how I fixed them in my case:

On Ubuntu 20.04 with Anaconda 4.10.1,

during python setup.py build_ext --inplace we get the following ouput:

Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    from torch.utils.cpp_extension import BuildExtension
  File "/home/matt/anaconda3/envs/oflow/lib/python3.6/site-packages/torch/__init__.py", line 84, in <module>
    from torch._C import *
ImportError: /home/matt/anaconda3/envs/oflow/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined symbol: cblas_sgemm_alloc

For some reason pytorch doesn't install correctly so this can be solved with pip install torch==1.0.0.

And in setup.py include_dirs=[numpy_include_dir] needs to be added to each extension that requires numpy as it doesn't seem to find it otherwise.

Hi, I am getting the same error. However, even after taking the steps which you suggested to solve the issue, the error doesn't go away. When I try to install torch==1.0.0 with pip, it says requirement already satisfied.

Where should I add include_dirs=[numpy_include_dir] in setup.py (I had added it before running the code, and still ran into this error; but I think it is possible that I added it at a wrong place within the file)

AmoghTiwari avatar Jul 22 '21 21:07 AmoghTiwari

Hi, I am getting the same error. However, even after taking the steps which you suggested to solve the issue, the error doesn't go away. When I try to install torch==1.0.0 with pip, it says requirement already satisfied.

You probably need to uninstall torch first and try again

Where should I add include_dirs=[numpy_include_dir] in setup.py (I had added it before running the code, and still ran into this error; but I think it is possible that I added it at a wrong place within the file)

Add it as an argument passed to each of the extension modules. For example, the mc_cubes extension has it already so copy it to the rest of the extensions in the same way

mjkmoynihan avatar Jul 23 '21 10:07 mjkmoynihan

Thanks. It worked after uninstalling and installing again

AmoghTiwari avatar Jul 29 '21 21:07 AmoghTiwari

I encountered the same problem and solved by running this; conda install mkl=2019 -c anaconda

So you don't need to reinstall pytorch. Maybe it is better to add this to environment.yaml.

MasahiroOgawa avatar May 22 '22 02:05 MasahiroOgawa