facebookresearch / multihop_dense_retrieval

Multi-hop dense retrieval for question answering
Other
212 stars 22 forks source link

Error when installing apex #19

Open Martin36 opened 3 years ago

Martin36 commented 3 years ago

When running the line pip install -v --disable-pip-version-check --no-cache-dir ./ in the python.sh script I get the following error:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-1ayy0jfq/setup.py", line 1, in <module>
        import torch
      File "/home/martin/anaconda3/envs/MDR/lib/python3.6/site-packages/torch/__init__.py", line 84, in <module>
        from torch._C import *
    ImportError: /home/martin/anaconda3/envs/MDR/lib/python3.6/site-packages/torch/lib/libmkldnn.so.0: undefined symbol: cblas_sgemm_alloc

Has anyone had a similar problem before or knows how to solve this?

Martin36 commented 3 years ago

I solved it by installing the following: conda install -c anaconda mkl. Don't know why it works though, but found the solution here: https://programmerah.com/undefined-symbol-cblas-appears-after-installing-pytorch1-0-0_-sgemm_-alloc-error-33055/

More info on the mlk package can be found here: https://docs.anaconda.com/mkl-optimizations/index.html. It seems to contain optimizations for some of the common ML libraries.