Error installing Opennyai Pipeline

I tired installing Opennayi Pipeline available at GitHub - OpenNyAI/Opennyai: Opennyai : An efficient NLP Pipeline for Indian Legal documents, however got the following error. Please help me out in resolving this (if possible)

--------------------------------------------Error Starts -----------------------------------------
(opennyai) PS C:\Users\Dell> pip install -U opennyai
Collecting opennyai
Using cached opennyai-0.0.10-py3-none-any.whl (168 kB)
INFO: pip is looking at multiple versions of opennyai to determine which version is compatible with other requirements. This could take a while.
Using cached opennyai-0.0.9-py3-none-any.whl (163 kB)
ERROR: Cannot install opennyai==0.0.10 and opennyai==0.0.9 because these package versions have conflicting dependencies.

The conflict is caused by:
opennyai 0.0.10 depends on torch<1.13.0 and >=1.10.0
opennyai 0.0.9 depends on torch<1.13.0 and >=1.10.0

To fix this you could try to:

  1. loosen the range of package versions you’ve specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit Dependency Resolution - pip documentation v23.3.dev0
---------------------------------------------- Error Ends -----------------------------------------

Please try creating a new virtual env and then try installing. Also python version should be 3.8.

I’ve moved this conversation to the right Topic.

@sahmed31 Did this work for you?

Thanks for the help @Prathamesh and @varun using conda the environment is not setup. However, we have a new issue now. Looks like some library issue:

Python Code:
from opennyai import Pipeline

Issue output:
Python 3.8.17 (default, Jul 5 2023, 20:44:21) [MSC v.1916 64 bit (AMD64)]
Type “copyright”, “credits” or “license” for more information.

IPython 8.12.0 – An enhanced Interactive Python.

runfile(‘C:/Users/Dell/.spyder-py3/’, wdir=‘C:/Users/Dell/.spyder-py3’)
C:\Users\Dell\anaconda3\envs\opennyai\lib\site-packages\tqdm\ TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See Installation — Jupyter Widgets 8.1.0 documentation
from .autonotebook import tqdm as notebook_tqdm
Traceback (most recent call last):

File ~\anaconda3\envs\opennyai\lib\site-packages\spyder_kernels\ in compat_exec
exec(code, globals, locals)

File c:\users\dell.spyder-py3\
from opennyai import Pipeline

File ~\anaconda3\envs\opennyai\lib\site-packages\
from opennyai import ner, utils

File ~\anaconda3\envs\opennyai\lib\site-packages\opennyai\
from .ner_utils import load, get_json_from_spacy_doc, ner_displacy_option, get_csv, get_unique_precedent_count, \

File ~\anaconda3\envs\opennyai\lib\site-packages\opennyai\ner\
from opennyai.ner.InLegalNER.InLegalNER import InLegalNER

File ~\anaconda3\envs\opennyai\lib\site-packages\opennyai\ner\InLegalNER\
import spacy

File ~\anaconda3\envs\opennyai\lib\site-packages\
from . import pipeline # noqa: F401

File ~\anaconda3\envs\opennyai\lib\site-packages\spacy\
from .attributeruler import AttributeRuler

File ~\anaconda3\envs\opennyai\lib\site-packages\spacy\pipeline\
from .pipe import Pipe

File spacy\pipeline\pipe.pyx:8 in init spacy.pipeline.pipe

File ~\anaconda3\envs\opennyai\lib\site-packages\spacy\
from .callbacks import create_copy_from_base_model # noqa: F401

File ~\anaconda3\envs\opennyai\lib\site-packages\spacy\training\
from …language import Language

File ~\anaconda3\envs\opennyai\lib\site-packages\spacy\
from .training.initialize import init_vocab, init_tok2vec

File ~\anaconda3\envs\opennyai\lib\site-packages\spacy\training\
from .pretrain import get_tok2vec_ref

File ~\anaconda3\envs\opennyai\lib\site-packages\spacy\training\
from …schemas import ConfigSchemaPretrain

File ~\anaconda3\envs\opennyai\lib\site-packages\spacy\
class TokenPattern(BaseModel):

File pydantic\ in

File pydantic\ in pydantic.fields.ModelField.infer

File pydantic\ in pydantic.fields.ModelField.init

File pydantic\ in pydantic.fields.ModelField.prepare

File pydantic\ in pydantic.fields.ModelField._type_analysis

File pydantic\ in pydantic.fields.ModelField._type_analysis

File ~\anaconda3\envs\opennyai\lib\ in subclasscheck
return issubclass(cls, self.origin)

TypeError: issubclass() arg 1 must be a class

We have fixed this and created a new release. Please try with latest version 0.0.11

Thanks @Prathamesh. The NLP Pipeline is working now.

1 Like