Support
Quality
Security
License
Reuse
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
Get all kandi verified functions for this library.
Vector database for scalable similarity search and AI applications.
QUESTION
ModuleNotFoundError: No module named 'milvus'
Asked 2022-Feb-15 at 19:23Goal: to run this Auto Labelling Notebook on AWS SageMaker Jupyter Labs.
Kernels tried: conda_pytorch_p36
, conda_python3
, conda_amazonei_mxnet_p27
.
! pip install farm-haystack -q
# Install the latest master of Haystack
!pip install grpcio-tools==1.34.1 -q
!pip install git+https://github.com/deepset-ai/haystack.git -q
!wget --no-check-certificate https://dl.xpdfreader.com/xpdf-tools-linux-4.03.tar.gz
!tar -xvf xpdf-tools-linux-4.03.tar.gz && sudo cp xpdf-tools-linux-4.03/bin64/pdftotext /usr/local/bin
!pip install git+https://github.com/deepset-ai/haystack.git -q
# Here are the imports we need
from haystack.document_stores.elasticsearch import ElasticsearchDocumentStore
from haystack.nodes import PreProcessor, TransformersDocumentClassifier, FARMReader, ElasticsearchRetriever
from haystack.schema import Document
from haystack.utils import convert_files_to_dicts, fetch_archive_from_http, print_answers
Traceback:
02/02/2022 10:36:29 - INFO - faiss.loader - Loading faiss with AVX2 support.
02/02/2022 10:36:29 - INFO - faiss.loader - Could not load library with AVX2 support due to:
ModuleNotFoundError("No module named 'faiss.swigfaiss_avx2'",)
02/02/2022 10:36:29 - INFO - faiss.loader - Loading faiss.
02/02/2022 10:36:29 - INFO - faiss.loader - Successfully loaded faiss.
02/02/2022 10:36:33 - INFO - farm.modeling.prediction_head - Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-6ff421127e9c> in <module>
1 # Here are the imports we need
----> 2 from haystack.document_stores.elasticsearch import ElasticsearchDocumentStore
3 from haystack.nodes import PreProcessor, TransformersDocumentClassifier, FARMReader, ElasticsearchRetriever
4 from haystack.schema import Document
5 from haystack.utils import convert_files_to_dicts, fetch_archive_from_http, print_answers
~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/haystack/__init__.py in <module>
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
~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/haystack/finder.py in <module>
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
~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/haystack/reader/__init__.py in <module>
----> 1 from haystack.reader.farm import FARMReader
2 from haystack.reader.transformers import TransformersReader
~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/haystack/reader/farm.py in <module>
22
23 from haystack import Document
---> 24 from haystack.document_store.base import BaseDocumentStore
25 from haystack.reader.base import BaseReader
26
~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/haystack/document_store/__init__.py in <module>
2 from haystack.document_store.faiss import FAISSDocumentStore
3 from haystack.document_store.memory import InMemoryDocumentStore
----> 4 from haystack.document_store.milvus import MilvusDocumentStore
5 from haystack.document_store.sql import SQLDocumentStore
~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/haystack/document_store/milvus.py in <module>
5 import numpy as np
6
----> 7 from milvus import IndexType, MetricType, Milvus, Status
8 from scipy.special import expit
9 from tqdm import tqdm
ModuleNotFoundError: No module named 'milvus'
pip install milvus
import milvus
Traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-91c33e248077> in <module>
----> 1 import milvus
ModuleNotFoundError: No module named 'milvus'
ANSWER
Answered 2022-Feb-03 at 09:29I would recommend to downgrade your milvus version to a version before the 2.0 release just a week ago. Here is a discussion on that topic: https://github.com/deepset-ai/haystack/issues/2081
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
See Similar Libraries in
Save this library and start creating your kit
Open Weaver – Develop Applications Faster with Open Source