langchain-ai / langchain

πŸ¦œπŸ”— Build context-aware reasoning applications
https://python.langchain.com
MIT License
95.5k stars 15.5k forks source link

TypeError: multiple bases have instance lay-out conflict #10060

Closed himswamy closed 11 months ago

himswamy commented 1 year ago

System Info

Langchain version -- 0.0.277 python verion -- 3.8.8 window platform

Who can help?

@hwchase17 @agola11

Hi I am not able to run any of the langchain syntex on my windows laptop. For example if I just run from langchain.llms import OpenAI I get the below error message. Can you please help!

TypeError Traceback (most recent call last)

in 1 import os 2 from dotenv import load_dotenv ----> 3 from langchain.llms import OpenAI ~\Anaconda3\lib\site-packages\langchain\__init__.py in 4 from typing import Optional 5 ----> 6 from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain 7 from langchain.chains import ( 8 ConversationChain, ~\Anaconda3\lib\site-packages\langchain\agents\__init__.py in 29 30 """ # noqa: E501 ---> 31 from langchain.agents.agent import ( 32 Agent, 33 AgentExecutor, ~\Anaconda3\lib\site-packages\langchain\agents\agent.py in 12 import yaml 13 ---> 14 from langchain.agents.agent_iterator import AgentExecutorIterator 15 from langchain.agents.agent_types import AgentType 16 from langchain.agents.tools import InvalidTool ~\Anaconda3\lib\site-packages\langchain\agents\agent_iterator.py in 19 ) 20 ---> 21 from langchain.callbacks.manager import ( 22 AsyncCallbackManager, 23 AsyncCallbackManagerForChainRun, ~\Anaconda3\lib\site-packages\langchain\callbacks\__init__.py in 8 """ 9 ---> 10 from langchain.callbacks.aim_callback import AimCallbackHandler 11 from langchain.callbacks.argilla_callback import ArgillaCallbackHandler 12 from langchain.callbacks.arize_callback import ArizeCallbackHandler ~\Anaconda3\lib\site-packages\langchain\callbacks\aim_callback.py in 3 4 from langchain.callbacks.base import BaseCallbackHandler ----> 5 from langchain.schema import AgentAction, AgentFinish, LLMResult 6 7 ~\Anaconda3\lib\site-packages\langchain\schema\__init__.py in 1 """**Schemas** are the LangChain Base Classes and Interfaces.""" 2 from langchain.schema.agent import AgentAction, AgentFinish ----> 3 from langchain.schema.cache import BaseCache 4 from langchain.schema.chat_history import BaseChatMessageHistory 5 from langchain.schema.document import BaseDocumentTransformer, Document ~\Anaconda3\lib\site-packages\langchain\schema\cache.py in 4 from typing import Any, Optional, Sequence 5 ----> 6 from langchain.schema.output import Generation 7 8 RETURN_VAL_TYPE = Sequence[Generation] ~\Anaconda3\lib\site-packages\langchain\schema\output.py in 7 from langchain.load.serializable import Serializable 8 from langchain.pydantic_v1 import BaseModel, root_validator ----> 9 from langchain.schema.messages import BaseMessage, BaseMessageChunk 10 11 ~\Anaconda3\lib\site-packages\langchain\schema\messages.py in 146 147 --> 148 class HumanMessageChunk(HumanMessage, BaseMessageChunk): 149 """A Human Message chunk.""" 150 ~\Anaconda3\lib\site-packages\pydantic\main.cp38-win_amd64.pyd in pydantic.main.ModelMetaclass.__new__() ~\Anaconda3\lib\abc.py in __new__(mcls, name, bases, namespace, **kwargs) 83 """ 84 def __new__(mcls, name, bases, namespace, **kwargs): ---> 85 cls = super().__new__(mcls, name, bases, namespace, **kwargs) 86 _abc_init(cls) 87 return cls TypeError: multiple bases have instance lay-out conflict ### Information - [X] The official example notebooks/scripts - [ ] My own modified scripts ### Related Components - [X] LLMs/Chat Models - [ ] Embedding Models - [ ] Prompts / Prompt Templates / Prompt Selectors - [ ] Output Parsers - [ ] Document Loaders - [ ] Vector Stores / Retrievers - [ ] Memory - [ ] Agents / Agent Executors - [ ] Tools / Toolkits - [X] Chains - [ ] Callbacks/Tracing - [ ] Async ### Reproduction !pip -q install openai langchain huggingface_hub import openai import dotenv import os os.environ['OPENAI_API_KEY'] = ' ... ' from langchain.llms import OpenAI ### Expected behavior Should be able to run without error
dosubot[bot] commented 1 year ago

πŸ€–

Hi there,

I'm sorry to hear that you're experiencing this issue. The error message you're seeing typically occurs when there's a conflict between the inheritance of classes in Python. This could be due to a variety of reasons, such as incompatible versions of dependencies or issues with the LangChain code itself.

To help me investigate this further, could you please provide the following additional information:

  1. The full list of Python packages installed in your environment. You can obtain this by running pip freeze in your terminal and sharing the output.
  2. The exact command or script you're running when you encounter this error.
  3. Any modifications you've made to the LangChain code or your environment.

This information will help me understand the context better and hopefully identify the root cause of the issue.

Thank you for your patience and cooperation.


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a πŸ‘ if this is helpful and πŸ‘Ž if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

himswamy commented 1 year ago

@dosu-bot

Below are the python packages as asked

absl-py @ file:///C:/ci/absl-py_1600297597805/work aiohttp==3.8.5 aiosignal==1.3.1 alabaster @ file:///home/ktietz/src/ci/alabaster_1611921544520/work altair==4.1.0 anaconda-client==1.7.2 anaconda-navigator==2.0.3 anaconda-project @ file:///tmp/build/80754af9/anaconda-project_1610472525955/work annotated-types==0.5.0 ansiwrap==0.8.4 anyio==3.3.0 appdirs==1.4.4 argh==0.26.2 argon2-cffi @ file:///C:/ci/argon2-cffi_1613037959010/work asn1crypto @ file:///tmp/build/80754af9/asn1crypto_1596577642040/work astor==0.8.1 astroid @ file:///C:/ci/astroid_1613501047216/work astropy @ file:///C:/ci/astropy_1617745647203/work astunparse==1.6.3 async-generator @ file:///home/ktietz/src/ci/async_generator_1611927993394/work async-timeout==4.0.2 atomicwrites==1.4.0 attrs @ file:///tmp/build/80754af9/attrs_1604765588209/work autopep8 @ file:///tmp/build/80754af9/autopep8_1615918855173/work azure-ai-textanalytics==5.1.0 azure-common==1.1.27 azure-core==1.16.0 Babel @ file:///tmp/build/80754af9/babel_1607110387436/work backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work backports.functools-lru-cache @ file:///tmp/build/80754af9/backports.functools_lru_cache_1618170165463/work backports.shutil-get-terminal-size @ file:///tmp/build/80754af9/backports.shutil_get_terminal_size_1608222128777/work backports.tempfile @ file:///home/linux1/recipes/ci/backports.tempfile_1610991236607/work backports.weakref==1.0.post1 backports.zoneinfo==0.2.1 base58==2.1.0 bcrypt @ file:///C:/ci/bcrypt_1597936263757/work beautifulsoup4 @ file:///home/linux1/recipes/ci/beautifulsoup4_1610988766420/work bertviz==1.2.0 bitarray @ file:///C:/ci/bitarray_1618435038389/work bkcharts==0.2 black==19.10b0 bleach @ file:///tmp/build/80754af9/bleach_1612211392645/work blinker==1.4 blis==0.7.4 bokeh @ file:///C:/ci/bokeh_1620784067744/work boto==2.49.0 boto3==1.18.20 botocore==1.21.20 Bottleneck==1.3.2 bpemb==0.3.3 brotlipy==0.7.0 cached-property==1.5.2 cachetools @ file:///tmp/build/80754af9/cachetools_1596822027882/work cairocffi==1.3.0 CairoSVG==2.5.2 camelot-py==0.10.1 captum==0.4.0 catalogue==2.0.4 certifi==2020.12.5 cffi @ file:///C:/ci/cffi_1613247279197/work chardet @ file:///C:/ci/chardet_1607690654534/work charset-normalizer==3.2.0 chart-studio==1.1.0 clang==5.0 click @ file:///home/linux1/recipes/ci/click_1610990599742/work cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1598884132938/work clyent==1.2.2 colorama @ file:///tmp/build/80754af9/colorama_1607707115595/work comtypes==1.1.9 conda==4.10.3 conda-build==3.21.4 conda-content-trust @ file:///tmp/build/80754af9/conda-content-trust_1617045594566/work conda-package-handling @ file:///C:/ci/conda-package-handling_1618262320430/work conda-repo-cli @ file:///tmp/build/80754af9/conda-repo-cli_1620168426516/work conda-token @ file:///tmp/build/80754af9/conda-token_1620076980546/work conda-verify==3.4.2 configparser==5.0.2 contextlib2==0.6.0.post1 corextopic==1.1 cryptography @ file:///C:/ci/cryptography_1616769344312/work cssselect2==0.5.0 cycler==0.10.0 cymem==2.0.5 Cython==0.29.14 cytoolz==0.11.0 dask @ file:///tmp/build/80754af9/dask-core_1617390489108/work dataclasses-json==0.5.14 datasets==1.11.0 decorator @ file:///tmp/build/80754af9/decorator_1617916966915/work defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work Deprecated==1.2.12 diff-match-patch @ file:///tmp/build/80754af9/diff-match-patch_1594828741838/work dill==0.3.4 distributed @ file:///C:/ci/distributed_1617384289923/work distro==1.7.0 dnspython==2.4.2 docker-pycreds==0.4.0 docutils @ file:///C:/ci/docutils_1617481617511/work en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.1.0/en_core_web_sm-3.1.0-py3-none-any.whl entrypoints==0.3 et-xmlfile==1.0.1 fastcache==1.1.0 filelock @ file:///home/linux1/recipes/ci/filelock_1610993975404/work flair==0.8.0.post1 flake8 @ file:///tmp/build/80754af9/flake8_1615834841867/work Flask @ file:///home/ktietz/src/ci/flask_1611932660458/work flatbuffers==1.12 frozenlist==1.4.0 fsspec==2021.7.0 ftfy==6.0.3 future==0.18.2 gast @ file:///tmp/build/80754af9/gast_1597433534803/work gdown==3.12.2 gensim==3.8.3 gevent @ file:///C:/ci/gevent_1616773090559/work ghostscript==0.7 gitdb==4.0.7 GitPython==3.1.18 glob2 @ file:///home/linux1/recipes/ci/glob2_1610991677669/work google==3.0.0 google-api-core==1.31.0 google-api-python-client==2.14.1 google-auth @ file:///tmp/build/80754af9/google-auth_1600960338579/work google-auth-httplib2==0.1.0 google-auth-oauthlib==0.4.1 google-cloud==0.34.0 google-cloud-core==1.7.1 google-cloud-language==2.2.1 google-cloud-storage==1.41.1 google-cloud-vision==2.4.1 google-crc32c==1.1.2 google-pasta==0.2.0 google-resumable-media==1.3.1 googleapis-common-protos==1.53.0 gptc @ git+https://github.com/mudano-data-solutions/GPTC.git@d4affb721498cbc054c5533a209fdd59a98f45f6 greenlet @ file:///C:/ci/greenlet_1611958565931/work grpcio @ file:///C:/ci/grpcio_1597406462198/work h11==0.9.0 h5py==3.1.0 HeapDict==1.0.1 html5lib @ file:///tmp/build/80754af9/html5lib_1593446221756/work httpcore==0.11.1 httplib2==0.19.1 httpx==0.15.5 huggingface-hub==0.0.12 hyperopt==0.2.5 ibm-cloud-sdk-core==3.11.0 ibm-watson==5.2.2 idna @ file:///home/linux1/recipes/ci/idna_1610986105248/work imagecodecs @ file:///C:/ci/imagecodecs_1617996768495/work imageio @ file:///tmp/build/80754af9/imageio_1617700267927/work imagesize @ file:///home/ktietz/src/ci/imagesize_1611921604382/work importlib-metadata @ file:///C:/ci/importlib-metadata_1617877484576/work iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work intel-openmp==2021.3.0 interpret-community==0.19.3 interpret-core==0.2.5 intervaltree @ file:///tmp/build/80754af9/intervaltree_1598376443606/work ipykernel @ file:///C:/ci/ipykernel_1596190155316/work/dist/ipykernel-5.3.4-py3-none-any.whl ipython @ file:///C:/ci/ipython_1617121002983/work ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work ipywidgets @ file:///tmp/build/80754af9/ipywidgets_1610481889018/work isodate==0.6.0 isort @ file:///tmp/build/80754af9/isort_1616355431277/work itsdangerous @ file:///home/ktietz/src/ci/itsdangerous_1611932585308/work Janome==0.4.1 jarowinkler==1.0.2 jdcal==1.4.1 jedi @ file:///C:/ci/jedi_1606914528444/work Jinja2 @ file:///tmp/build/80754af9/jinja2_1612213139570/work jmespath==0.10.0 joblib @ file:///tmp/build/80754af9/joblib_1613502643832/work json5==0.9.5 jsonschema @ file:///tmp/build/80754af9/jsonschema_1602607155483/work jupyter==1.0.0 jupyter-client @ file:///tmp/build/80754af9/jupyter_client_1616770841739/work jupyter-console @ file:///tmp/build/80754af9/jupyter_console_1616615302928/work jupyter-contrib-core==0.3.3 jupyter-contrib-nbextensions==0.5.1 jupyter-core @ file:///C:/ci/jupyter_core_1612213356021/work jupyter-highlight-selected-word==0.2.0 jupyter-latex-envs==1.4.6 jupyter-nbextensions-configurator==0.4.1 jupyter-packaging @ file:///tmp/build/80754af9/jupyter-packaging_1613502826984/work jupyter-server @ file:///C:/ci/jupyter_server_1616084298403/work jupyterlab @ file:///tmp/build/80754af9/jupyterlab_1619133235951/work jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work jupyterlab-server @ file:///tmp/build/80754af9/jupyterlab_server_1617134334258/work jupyterlab-widgets @ file:///tmp/build/80754af9/jupyterlab_widgets_1609884341231/work keras==2.6.0 Keras-Applications @ file:///tmp/build/80754af9/keras-applications_1594366238411/work keras-bert==0.88.0 keras-embed-sim==0.9.0 keras-layer-normalization==0.15.0 keras-multi-head==0.28.0 keras-pos-embd==0.12.0 keras-position-wise-feed-forward==0.7.0 Keras-Preprocessing==1.1.0 keras-self-attention==0.50.0 keras-transformer==0.39.0 keyring @ file:///C:/ci/keyring_1614616910860/work kiwisolver @ file:///C:/ci/kiwisolver_1612282606037/work konoha==4.6.5 langchain==0.0.277 langdetect==1.0.9 langsmith==0.0.28 lazy-object-proxy @ file:///C:/ci/lazy-object-proxy_1616529307648/work libarchive-c @ file:///tmp/build/80754af9/python-libarchive-c_1617780486945/work llvmlite==0.36.0 locket==0.2.1 loguru==0.7.0 lxml @ file:///C:/ci/lxml_1616443455957/work Markdown @ file:///C:/ci/markdown_1603216581811/work MarkupSafe==1.1.1 marshmallow==3.20.1 matplotlib @ file:///C:/ci/matplotlib-suite_1613408055530/work mccabe==0.6.1 menuinst==1.4.16 mistune==0.8.4 mkl-fft==1.3.0 mkl-random @ file:///C:/ci/mkl_random_1618854156666/work mkl-service==2.3.0 mock @ file:///tmp/build/80754af9/mock_1607622725907/work more-itertools @ file:///tmp/build/80754af9/more-itertools_1613676688952/work mplcursors==0.5.1 mpld3==0.3 mpmath==1.2.1 msgpack @ file:///C:/ci/msgpack-python_1612287368835/work msrest==0.6.21 multidict==6.0.4 multipledispatch==0.6.0 multiprocess==0.70.12.2 murmurhash==1.0.5 mypy-extensions==0.4.3 navigator-updater==0.2.1 nbclassic @ file:///tmp/build/80754af9/nbclassic_1616085367084/work nbclient @ file:///tmp/build/80754af9/nbclient_1614364831625/work nbconvert @ file:///C:/ci/nbconvert_1601914925608/work nbformat @ file:///tmp/build/80754af9/nbformat_1617383369282/work nest-asyncio @ file:///tmp/build/80754af9/nest-asyncio_1613680548246/work networkx @ file:///tmp/build/80754af9/networkx_1598376031484/work nltk @ file:///tmp/build/80754af9/nltk_1618327084230/work nose @ file:///tmp/build/80754af9/nose_1606773131901/work notebook @ file:///C:/ci/notebook_1616443715883/work numba @ file:///C:/ci/numba_1616774458845/work numexpr==2.8.5 numpy==1.24.4 numpydoc @ file:///tmp/build/80754af9/numpydoc_1605117425582/work oauth2client==4.1.3 oauthlib==3.1.0 olefile==0.46 openai==0.27.10 opencv-python==4.5.5.64 openpyxl @ file:///tmp/build/80754af9/openpyxl_1615411699337/work opt-einsum==3.1.0 overrides==3.1.0 packaging==21.3 pandas==1.3.1 pandocfilters @ file:///C:/ci/pandocfilters_1605102497129/work papermill==2.3.3 paramiko @ file:///tmp/build/80754af9/paramiko_1598886428689/work parso==0.7.0 partd @ file:///tmp/build/80754af9/partd_1618000087440/work path @ file:///C:/ci/path_1614022440181/work pathlib2 @ file:///C:/ci/pathlib2_1607025069150/work pathspec==0.7.0 pathtools==0.1.2 pathy==0.6.0 patsy==0.5.1 pbr==3.1.1 pdfminer.six==20220319 pep8==1.7.1 pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work Pillow==9.1.0 pinecone-client==2.2.2 pkginfo==1.7.0 plotly==5.1.0 pluggy @ file:///C:/ci/pluggy_1615976358795/work ply==3.11 preshed==3.0.5 prometheus-client @ file:///tmp/build/80754af9/prometheus_client_1618088486455/work promise==2.3 prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1616415428029/work proto-plus==1.19.0 protobuf==3.13.0 psutil @ file:///C:/ci/psutil_1612298324802/work ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl py @ file:///tmp/build/80754af9/py_1607971587848/work pyarrow==5.0.0 pyasn1==0.4.8 pyasn1-modules==0.2.8 pyclipper==1.3.0.post2 pycodestyle @ file:///home/ktietz/src/ci_mi/pycodestyle_1612807597675/work pycosat==0.6.3 pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work pycurl==7.43.0.6 pydantic==2.3.0 pydantic_core==2.6.3 pydeck==0.6.2 pydocstyle @ file:///tmp/build/80754af9/pydocstyle_1616182067796/work PyDrive==1.3.1 pyerfa @ file:///C:/ci/pyerfa_1619391071834/work pyflakes @ file:///home/ktietz/src/ci_ipy2/pyflakes_1612551159640/work Pygments @ file:///tmp/build/80754af9/pygments_1615143339740/work PyJWT==1.7.1 pylint @ file:///C:/ci/pylint_1617136058775/work pyls-black @ file:///tmp/build/80754af9/pyls-black_1607553132291/work pyls-spyder @ file:///tmp/build/80754af9/pyls-spyder_1613849700860/work PyMuPDF==1.18.10 PyNaCl @ file:///C:/ci/pynacl_1595000047588/work pyodbc===4.0.0-unsupported pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1608057966937/work pyparsing @ file:///home/linux1/recipes/ci/pyparsing_1610983426697/work PyPDF2==1.26.0 pyphen==0.12.0 pyreadline==2.1 pyrsistent @ file:///C:/ci/pyrsistent_1600141795814/work PySocks @ file:///C:/ci/pysocks_1605287845585/work pytesseract==0.3.9 pytest==6.2.3 python-dateutil @ file:///home/ktietz/src/ci/python-dateutil_1611928101742/work python-doctr==0.4.0 python-dotenv==1.0.0 python-jsonrpc-server @ file:///tmp/build/80754af9/python-jsonrpc-server_1600278539111/work python-language-server @ file:///tmp/build/80754af9/python-language-server_1607972495879/work python-Levenshtein @ file:///D:/bld/python-levenshtein_1612200656976/work pytorch-nlp==0.5.0 pytorch-pretrained-bert==0.6.2 pytz @ file:///tmp/build/80754af9/pytz_1612215392582/work PyWavelets @ file:///C:/ci/pywavelets_1601658407916/work pywin32==227 pywin32-ctypes==0.2.0 pywinpty==0.5.7 PyYAML==5.4.1 pyzmq==20.0.0 QDarkStyle==2.8.1 QtAwesome @ file:///tmp/build/80754af9/qtawesome_1615991616277/work qtconsole @ file:///tmp/build/80754af9/qtconsole_1616775094278/work QtPy==1.9.0 rapidfuzz==2.0.8 regex==2023.6.3 requests==2.31.0 requests-oauthlib==1.3.0 retrying==1.3.3 rfc3986==1.5.0 rope @ file:///tmp/build/80754af9/rope_1602264064449/work rsa @ file:///tmp/build/80754af9/rsa_1596998415516/work Rtree @ file:///C:/ci/rtree_1618421009405/work ruamel-yaml-conda @ file:///C:/ci/ruamel_yaml_1616016967756/work rubrix==0.3.0 s3transfer==0.5.0 sacremoses==0.0.45 scikit-image==0.18.1 scikit-learn @ file:///C:/ci/scikit-learn_1614446896245/work scipy @ file:///C:/ci/scipy_1618856128765/work scrapbook==0.5.0 seaborn @ file:///tmp/build/80754af9/seaborn_1608578541026/work segtok==1.5.10 Send2Trash @ file:///tmp/build/80754af9/send2trash_1607525499227/work sentencepiece==0.1.95 sentry-sdk==1.3.1 seqeval==1.2.2 shap==0.39.0 Shapely==1.8.1.post1 shortuuid==1.0.1 simplegeneric==0.8.1 simpletransformers==0.61.13 singledispatch @ file:///tmp/build/80754af9/singledispatch_1614366001199/work sip==4.19.13 six @ file:///C:/ci/six_1605187374963/work slicer==0.0.7 smart-open==5.1.0 smmap==4.0.0 sniffio @ file:///C:/ci/sniffio_1614030707456/work snowballstemmer @ file:///tmp/build/80754af9/snowballstemmer_1611258885636/work sortedcollections @ file:///tmp/build/80754af9/sortedcollections_1611172717284/work sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1606865132123/work soupsieve @ file:///tmp/build/80754af9/soupsieve_1616183228191/work spacy==3.1.1 spacy-legacy==3.0.8 Sphinx @ file:///tmp/build/80754af9/sphinx_1620777493457/work sphinxcontrib-applehelp @ file:///home/ktietz/src/ci/sphinxcontrib-applehelp_1611920841464/work sphinxcontrib-devhelp @ file:///home/ktietz/src/ci/sphinxcontrib-devhelp_1611920923094/work sphinxcontrib-htmlhelp @ file:///home/ktietz/src/ci/sphinxcontrib-htmlhelp_1611920974801/work sphinxcontrib-jsmath @ file:///home/ktietz/src/ci/sphinxcontrib-jsmath_1611920942228/work sphinxcontrib-qthelp @ file:///home/ktietz/src/ci/sphinxcontrib-qthelp_1611921055322/work sphinxcontrib-serializinghtml @ file:///home/ktietz/src/ci/sphinxcontrib-serializinghtml_1611920755253/work sphinxcontrib-websupport @ file:///tmp/build/80754af9/sphinxcontrib-websupport_1597081412696/work spyder @ file:///C:/ci/spyder_1616776239898/work spyder-kernels @ file:///C:/ci/spyder-kernels_1614030842607/work SQLAlchemy @ file:///C:/ci/sqlalchemy_1618090063261/work sqlitedict==1.7.0 srsly==2.4.1 starlette==0.16.0 statsmodels==0.12.2 stop-words==2018.7.23 streamlit==0.87.0 subprocess32==3.5.4 sympy @ file:///C:/ci/sympy_1618255511605/work table-ocr==0.2.5 tables==3.6.1 tabula-py==2.3.0 tabulate==0.8.9 tblib @ file:///tmp/build/80754af9/tblib_1597928476713/work tenacity==8.2.3 tensorboard @ file:///home/builder/ktietz/aggregate/tensorflow_recipes/ci_baze37/tensorboard_1622025863084/work/tensorboard-2.5.0-py3-none-any.whl tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.6.0 tensorboardX==2.4 tensorflow==2.6.0 tensorflow-estimator @ file:///tmp/build/80754af9/tensorflow-estimator_1599136169057/work/whl_temp/tensorflow_estimator-2.3.0-py2.py3-none-any.whl tensorflow-hub==0.12.0 termcolor==1.1.0 terminado==0.9.4 testpath @ file:///home/ktietz/src/ci/testpath_1611930608132/work textdistance @ file:///tmp/build/80754af9/textdistance_1612461398012/work textwrap3==0.9.2 thinc==8.0.8 threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl three-merge @ file:///tmp/build/80754af9/three-merge_1607553261110/work tifffile @ file:///tmp/build/80754af9/tifffile_1619636090847/work tiktoken==0.4.0 tinycss2==1.1.1 tokenizers==0.10.3 toml @ file:///tmp/build/80754af9/toml_1616166611790/work tomotopy==0.12.1 toolz @ file:///home/linux1/recipes/ci/toolz_1610987900194/work torch==1.8.1 torchtext==0.10.0 tornado @ file:///C:/ci/tornado_1606942392901/work tqdm==4.66.1 traitlets @ file:///home/ktietz/src/ci/traitlets_1611929699868/work transformers @ git+https://github.com/huggingface/transformers.git@76c4d8bf26de3e4ab23b8afeed68479c2bbd9cbd transformers-interpret==0.5.2 typed-ast @ file:///C:/ci/typed-ast_1610466535590/work typer==0.3.2 typing-inspect==0.9.0 typing_extensions==4.7.1 tzdata==2021.1 tzlocal==3.0 ujson @ file:///C:/ci/ujson_1611241570789/work unicodecsv==0.14.1 Unidecode==1.3.4 uritemplate==3.0.1 urllib3 @ file:///tmp/build/80754af9/urllib3_1615837158687/work vaderSentiment==3.3.2 validators==0.18.2 wandb==0.12.0 wasabi==0.8.2 watchdog @ file:///C:/ci/watchdog_1612471251191/work wcwidth @ file:///tmp/build/80754af9/wcwidth_1593447189090/work WeasyPrint==52.5 webencodings==0.5.1 websocket-client==1.1.0 Werkzeug @ file:///home/ktietz/src/ci/werkzeug_1611932622770/work widgetsnbextension==3.5.1 win-inet-pton @ file:///C:/ci/win_inet_pton_1605306167264/work win-unicode-console==0.5 win32-setctime==1.1.0 wincertstore==0.2 wordcloud==1.8.1 wrapt==1.12.1 xlrd @ file:///tmp/build/80754af9/xlrd_1608072521494/work XlsxWriter @ file:///tmp/build/80754af9/xlsxwriter_1617224712951/work xlwings==0.23.0 xlwt==1.3.0 xmltodict==0.12.0 xxhash==2.0.2 yapf @ file:///tmp/build/80754af9/yapf_1615749224965/work yarl==1.9.2 zict==2.0.0 zipp @ file:///tmp/build/80754af9/zipp_1615904174917/work zope.event==4.5.0 zope.interface @ file:///C:/ci/zope.interface_1616357322857/work

code :-

!pip -q install openai langchain huggingface_hub import openai import dotenv import os os.environ['OPENAI_API_KEY'] = ' ... ' from langchain.llms import OpenAI

alpha-21 commented 1 year ago

Hello do you resolve your issue, cuz i have the same since two days, i change version of pydentic and langchain but until now i have the same issue

himswamy commented 1 year ago

Hello do you resolve your issue, cuz i have the same since two days, i change version of pydentic and langchain but until now i have the same issue

Hey I am able to solve this issue with again install Langchain using :- pip install langchain[all] . This will suppress the conflict

alpha-21 commented 1 year ago

@himswamy thank you for your answer but for me i have a new issue

Building wheel for hnswlib (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 /tmp/tmphrkeylrl_in_process.py build_wheel /tmp/tmp3aejojh5 cwd: /tmp/pip-install-wtdvamm9/hnswlib Complete output (21 lines): running bdist_wheel running build running build_ext creating tmp x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.9 -c /tmp/tmpzz0otw5w.cpp -o tmp/tmpzz0otw5w.o -std=c++14 x8664-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.9 -c /tmp/tmp73e62ri.cpp -o tmp/tmp73e62ri_.o -fvisibility=hidden building 'hnswlib' extension creating build creating build/temp.linux-x86_64-cpython-39 creating build/temp.linux-x86_64-cpython-39/python_bindings x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-j_cemyld/overlay/lib/python3.9/site-packages/pybind11/include -I/tmp/pip-build-env-j_cemyld/overlay/lib/python3.9/site-packages/numpy/core/include -I./hnswlib/ -I/usr/include/python3.9 -c ./python_bindings/bindings.cpp -o build/temp.linux-x86_64-cpython-39/./python_bindings/bindings.o -O3 -march=native -fopenmp -DVERSION_INFO=\"0.7.0\" -std=c++14 -fvisibility=hidden In file included from /tmp/pip-build-env-j_cemyld/overlay/lib/python3.9/site-packages/pybind11/include/pybind11/detail/../attr.h:13, from /tmp/pip-build-env-j_cemyld/overlay/lib/python3.9/site-packages/pybind11/include/pybind11/detail/class.h:12, from /tmp/pip-build-env-j_cemyld/overlay/lib/python3.9/site-packages/pybind11/include/pybind11/pybind11.h:13, from /tmp/pip-build-env-j_cemyld/overlay/lib/python3.9/site-packages/pybind11/include/pybind11/functional.h:12, from ./python_bindings/bindings.cpp:2: /tmp/pip-build-env-j_cemyld/overlay/lib/python3.9/site-packages/pybind11/include/pybind11/detail/../detail/common.h:266:10: fatal error: Python.h: No such file or directory 266 | #include | ^~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

ERROR: Failed building wheel for hnswlib Failed to build hnswlib ERROR: Could not build wheels for hnswlib which use PEP 517 and cannot be installed directly

dosubot[bot] commented 12 months ago

Hi, @himswamy! I'm helping the LangChain team manage their backlog and am marking this issue as stale.

It looks like you're encountering a "TypeError: multiple bases have instance lay-out conflict" when trying to run langchain syntax on a Windows laptop. There have been some discussions with dosubot requesting additional information to investigate the issue further, and alpha-21 reported encountering a similar issue with a solution provided by you involving reinstallation of Langchain. However, alpha-21 encountered a new issue related to building the wheel for hnswlib.

Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!