Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor installation errors #5

Open
mjkmoynihan opened this issue May 20, 2021 · 4 comments
Open

Some minor installation errors #5

mjkmoynihan opened this issue May 20, 2021 · 4 comments

Comments

@mjkmoynihan
Copy link

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.

@AmoghTiwari
Copy link

AmoghTiwari commented Jul 22, 2021

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)

@mjkmoynihan
Copy link
Author

mjkmoynihan commented Jul 23, 2021

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

@AmoghTiwari
Copy link

Thanks. It worked after uninstalling and installing again

@MasahiroOgawa
Copy link
Contributor

MasahiroOgawa commented May 22, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants