-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Haystack not running on Mac M1 #1310
Comments
Hi @nisrj10 , sorry that it's not running for you at the moment. My first instinct is to say this could be a versioning problem. Am I right in saying that you are installing the latest master by cloning the repo? (I'm making this guess because I see this line which is quite a recent addition If so, could you try installing an official release version of haystack via pip? (i.e. |
@brandenchan I had it installed with pip . And I am getting different error due to scipy and other dependencies not installing through requirements.txt when pip install for farm-haystack is done. |
Are you able to install scipy and these other dependencies by themself? i.e. |
@julian-risch can you replicate this problem on your Mac? |
I am currently executing FARM and haystack in an Intel python version and not Apple M1 ARM python version. Without breaking my current setup it's hard to replicate the problem, sorry. 😕 However, I am sure that the problems reported here are not about haystack itself but its requirements. Miniforge is the way to go, in my opinion, e.g., have a look here. faiss-cpu will be a challenge. As I understand it, you will need to compile it yourself. It's unfortunate that there is no support of Apple M1 ARM for many of the libraries. Most people are using workarounds to still have Intel and Apple M1 ARM compatibility. |
@brandenchan no not anymore. |
@julian-risch I will try compiling faiss-cpu and check if that fixes it. |
Hi @nisrj10 I had a look today and managed to install most of haystack's dependencies but not all. Currently, I am still working on installing the following:
It seems that all of them would need to be compiled if you want to use them. Most of them are optional, which means that large parts of haystack can be used without them. The good news is that FARM can be installed for Apple M1 without any bigger problems. |
Got Same issue trying to run farm. |
I installed sentencepiece via |
Hi @nisrj10 let me list the steps that I followed to get haystack running on Mac M1 aka Apple Silicon in more detail:
Note that we did not install all dependencies, such as Please let me know if that works for you so that we can close the issue. I would recommend to start with a fresh virtual environment. |
Thanks @julian-risch I will try this out. Appreciate the help. |
@julian-risch Farm installation worked fine. Haystack installation didn't work as grpcio installation caused issues. |
I don't think I had to install |
Anyway, What does not work is to install |
Hi @nisrj10 did you manage to get it running on your machine by following the instructions listed above? |
Thanks @julian-risch for the step by step instructions. I needed to install grpcio with the following command: |
Great news! I will close this issue then. @nisrj10 Feel free to reopen if you are still facing problems with setting up haystack on Apple Mac M1. |
I had simillar problems with haystack on M1 with python version 3.9.9
So in the end my command was: brew install postgresql
brew install cmake
GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true pip install git+https://github.com/deepset-ai/haystack.git |
I also had to install rust because
|
For the Poetry users, this worked for me:
|
Description:
I had the library working fine about 2 months ago. Suddenly it is giving me this error. I tried installing again in new conda env, but scipy installation is stopping installation, as an alternative looked at using miniforge3 but there faiss-cpu won't install. So, I am back to start trying to figure out how to fix this.
error:
ValueError Traceback (most recent call last)
in
----> 1 from haystack.connector import Crawler
~/Documents/Ai_projects/haystack/haystack/init.py in
3 import pandas as pd
4 from haystack.schema import Document, Label, MultiLabel, BaseComponent
----> 5 from haystack.finder import Finder
6 from haystack.pipeline import Pipeline
7 from haystack._version import version
~/Documents/Ai_projects/haystack/haystack/finder.py in
6 from collections import defaultdict
7
----> 8 from haystack.reader.base import BaseReader
9 from haystack.retriever.base import BaseRetriever
10 from haystack import MultiLabel
~/Documents/Ai_projects/haystack/haystack/reader/init.py in
----> 1 from haystack.reader.farm import FARMReader
2 from haystack.reader.transformers import TransformersReader
~/Documents/Ai_projects/haystack/haystack/reader/farm.py in
6 from time import perf_counter
7
----> 8 from farm.data_handler.data_silo import DataSilo
9 from farm.data_handler.processor import SquadProcessor
10 from farm.data_handler.dataloader import NamedDataLoader
~/opt/anaconda3/envs/LiveAi/lib/python3.8/site-packages/farm/data_handler/data_silo.py in
18
19 from farm.data_handler.dataloader import NamedDataLoader
---> 20 from farm.data_handler.processor import Processor, BertStyleLMProcessor
21 from farm.data_handler.utils import grouper
22 from farm.modeling.tokenization import EmbeddingTokenizer
~/opt/anaconda3/envs/LiveAi/lib/python3.8/site-packages/farm/data_handler/processor.py in
15 from tokenizers import Encoding
16 from tokenizers.pre_tokenizers import WhitespaceSplit
---> 17 from transformers import AutoConfig
18
19 from farm.data_handler.dataset import convert_features_to_dataset
~/opt/anaconda3/envs/LiveAi/lib/python3.8/site-packages/transformers/init.py in
41
42 # Check the dependencies satisfy the minimal versions required.
---> 43 from . import dependency_versions_check
44 from .file_utils import (
45 _LazyModule,
~/opt/anaconda3/envs/LiveAi/lib/python3.8/site-packages/transformers/dependency_versions_check.py in
39 continue # not required, check version only if installed
40
---> 41 require_version_core(deps[pkg])
42 else:
43 raise ValueError(f"can't find {pkg} in {deps.keys()}, check dependency_versions_table.py")
~/opt/anaconda3/envs/LiveAi/lib/python3.8/site-packages/transformers/utils/versions.py in require_version_core(requirement)
118 """require_version wrapper which emits a core-specific hint on failure"""
119 hint = "Try: pip install transformers -U or pip install -e '.[dev]' if you're working with git master"
--> 120 return require_version(requirement, hint)
~/opt/anaconda3/envs/LiveAi/lib/python3.8/site-packages/transformers/utils/versions.py in require_version(requirement, hint)
112 if want_ver is not None:
113 for op, want_ver in wanted.items():
--> 114 _compare_versions(op, got_ver, want_ver, requirement, pkg, hint)
115
116
~/opt/anaconda3/envs/LiveAi/lib/python3.8/site-packages/transformers/utils/versions.py in _compare_versions(op, got_ver, want_ver, requirement, pkg, hint)
43 def _compare_versions(op, got_ver, want_ver, requirement, pkg, hint):
44 if got_ver is None:
---> 45 raise ValueError("got_ver is None")
46 if want_ver is None:
47 raise ValueError("want_ver is None")
ValueError: got_ver is None
The text was updated successfully, but these errors were encountered: