Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

[BUG]版本冲突

Open limi1 opened this issue 1 year ago • 3 comments

版本冲突 用简洁明了的语言描述这个问题 / Describe the problem in a clear and concise manner.

复现问题的步骤 / Steps to Reproduce

  1. 下载最新代码
  2. 激活虚拟环境下载依赖:pip install -r requirements.txt
  3. 报错
  4. 问题出现 / Problem occurs

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. aliyun-python-sdk-core 2.14.0 requires jmespath<1.0.0,>=0.9.3, which is not installed. datasets 2.17.1 requires dill<0.3.9,>=0.3.0, which is not installed. datasets 2.17.1 requires multiprocess, which is not installed. datasets 2.17.1 requires xxhash, which is not installed. gradio 4.8.0 requires ffmpy, which is not installed. gradio 4.8.0 requires importlib-resources<7.0,>=1.3, which is not installed. gradio 4.8.0 requires orjson~=3.0, which is not installed. gradio 4.8.0 requires pydub, which is not installed. gradio 4.8.0 requires semantic-version~=2.0, which is not installed. modelscope 1.12.0 requires sortedcontainers>=1.5.9, which is not installed. modelscope 1.12.0 requires yapf, which is not installed. moviepy 1.0.3 requires imageio<3.0,>=2.5; python_version >= "3.4", which is not installed. gradio 4.8.0 requires pydantic>=2.0, but you have pydantic 1.10.13 which is incompatible. gradio-client 0.7.1 requires websockets<12.0,>=10.0, but you have websockets 12.0 which is incompatible. zhipuai 2.0.1 requires pydantic>=2.5.2, but you have pydantic 1.10.13 which is incompatible.

limi1 avatar Feb 29 '24 02:02 limi1

🤖

Based on the error messages you provided, it seems that there are several dependencies that are either not installed or are incompatible with the versions required by other packages. Here are some steps you can take to resolve these issues:

  1. Install Missing Dependencies: Some of the errors indicate that certain packages are not installed. You can install these missing packages using pip. For example, to install jmespath, dill, multiprocess, xxhash, ffmpy, importlib-resources, orjson, pydub, semantic-version, sortedcontainers, yapf, imageio, you can use the following command:

    pip install jmespath dill multiprocess xxhash ffmpy importlib-resources orjson pydub semantic-version sortedcontainers yapf imageio
    
  2. Resolve Version Conflicts: Some of the errors are due to version conflicts. For example, gradio requires pydantic version 2.0 or higher, but you have pydantic version 1.10.13 installed. Similarly, gradio-client requires websockets version less than 12.0, but you have websockets version 12.0 installed. To resolve these conflicts, you can try uninstalling the current versions and installing the required versions. For example:

    pip uninstall pydantic websockets
    pip install pydantic==2.0 websockets==11.0
    
  3. Reinstall Dependencies: After resolving the conflicts, try reinstalling the dependencies from the requirements.txt file:

    pip install -r requirements.txt
    

If you still encounter issues, it might be helpful to create a new virtual environment and start the installation process from scratch to avoid any potential conflicts with previously installed packages.

Also, based on similar issues in the Langchain-Chatchat repository, you might find the following solutions helpful:

  • If you encounter issues with installing jq, you can try installing it using conda instead of pip (source).
  • If you encounter issues with torch and xformers versions, you can try installing a specific version of xformers that is compatible with CUDA 11.8 (source).
  • If you encounter issues with installing langchain, you can try installing it using the following pip command: pip install langchain -i https://pypi.org/simple (source).

I hope this helps! If you have any further questions or if the issue persists, please provide more details so I can assist you better.

Sources

About Dosu

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.

dosubot[bot] avatar Feb 29 '24 02:02 dosubot[bot]

(langchain-ChatGLM-master) E:\workspace\python\langchain-ChatGLM-master>pip install jmespath dill multiprocess xxhash ffmpy importlib-resources orjson pydub semantic-version sortedcontainers yapf imageio Looking in indexes: https://mirrors.aliyun.com/pypi/simple Collecting jmespath Downloading https://mirrors.aliyun.com/pypi/packages/31/b4/b9b800c45527aadd64d5b442f9b932b00648617eb5d63d2c7a6587b7cafc/jmespath-1.0.1-py3-none-any.whl (20 kB) Collecting dill Downloading https://mirrors.aliyun.com/pypi/packages/c9/7a/cef76fd8438a42f96db64ddaa85280485a9c395e7df3db8158cfec1eee34/dill-0.3.8-py3-none-any.whl (116 kB) ---------------------------------------- 116.3/116.3 kB 1.4 MB/s eta 0:00:00 Collecting multiprocess Downloading https://mirrors.aliyun.com/pypi/packages/50/15/b56e50e8debaf439f44befec5b2af11db85f6e0f344c3113ae0be0593a91/multiprocess-0.70.16-py311-none-any.whl (143 kB) ---------------------------------------- 143.5/143.5 kB 1.4 MB/s eta 0:00:00 Collecting xxhash Downloading https://mirrors.aliyun.com/pypi/packages/b7/3a/74a609706ef4430fe6d041a3b8d209882c15440b695e373fe26d48c6f35c/xxhash-3.4.1-cp311-cp311-win_amd64.whl (29 kB) Collecting ffmpy Using cached https://mirrors.aliyun.com/pypi/packages/1d/70/07914754979f5dd80bda947a0ffd181c08bfcb137b01c3c0cef45254d271/ffmpy-0.3.2.tar.gz (5.5 kB) Preparing metadata (setup.py) ... done Collecting importlib-resources Downloading https://mirrors.aliyun.com/pypi/packages/ba/0b/27d13042335942abc29a87f49f1ce6b56fa58e025e96454ef25929aeb603/importlib_resources-6.1.2-py3-none-any.whl (34 kB) Collecting orjson Downloading https://mirrors.aliyun.com/pypi/packages/8c/37/3623de71a63c2182f121d9efba488ad606a9934d2f4ba3df51baf428fe96/orjson-3.9.15-cp311-none-win_amd64.whl (136 kB) ---------------------------------------- 136.0/136.0 kB 2.0 MB/s eta 0:00:00 Collecting pydub Downloading https://mirrors.aliyun.com/pypi/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl (32 kB) Collecting semantic-version Downloading https://mirrors.aliyun.com/pypi/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl (15 kB) Collecting sortedcontainers Downloading https://mirrors.aliyun.com/pypi/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB) Collecting yapf Downloading https://mirrors.aliyun.com/pypi/packages/66/c9/d4b03b2490107f13ebd68fe9496d41ae41a7de6275ead56d0d4621b11ffd/yapf-0.40.2-py3-none-any.whl (254 kB) ---------------------------------------- 254.7/254.7 kB 1.7 MB/s eta 0:00:00 Collecting imageio Downloading https://mirrors.aliyun.com/pypi/packages/02/25/66533a8390e3763cf8254dee143dbf8a830391ea60d2762512ba7f9ddfbe/imageio-2.34.0-py3-none-any.whl (313 kB) ---------------------------------------- 313.4/313.4 kB 1.8 MB/s eta 0:00:00 Requirement already satisfied: importlib-metadata>=6.6.0 in c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages (from yapf) (7.0.1) Collecting platformdirs>=3.5.1 (from yapf) Downloading https://mirrors.aliyun.com/pypi/packages/55/72/4898c44ee9ea6f43396fbc23d9bfaf3d06e01b83698bdf2e4c919deceb7c/platformdirs-4.2.0-py3-none-any.whl (17 kB) Collecting tomli>=2.0.1 (from yapf) Downloading https://mirrors.aliyun.com/pypi/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl (12 kB) Requirement already satisfied: numpy in c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages (from imageio) (1.24.4) Requirement already satisfied: pillow>=8.3.2 in c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages (from imageio) (9.5.0) Requirement already satisfied: zipp>=0.5 in c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages (from importlib-metadata>=6.6.0->yapf) (3.17.0) Building wheels for collected packages: ffmpy Building wheel for ffmpy (setup.py) ... done Created wheel for ffmpy: filename=ffmpy-0.3.2-py3-none-any.whl size=5605 sha256=12ecf23acce50c00997744c317530c365e3366dc62616e22ac86b13975988f18 Stored in directory: c:\users\13924\appdata\local\pip\cache\wheels\69\74\b4\94c93f10f90b58dc376995d6bf109b5ff7fc411d78c8d078b1 Successfully built ffmpy Installing collected packages: sortedcontainers, pydub, ffmpy, xxhash, tomli, semantic-version, platformdirs, orjson, jmespath, importlib-resources, imageio, dill, yapf, multiprocess ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. aliyun-python-sdk-core 2.14.0 requires jmespath<1.0.0,>=0.9.3, but you have jmespath 1.0.1 which is incompatible. gradio 4.8.0 requires pydantic>=2.0, but you have pydantic 1.10.13 which is incompatible. Successfully installed dill-0.3.8 ffmpy-0.3.2 imageio-2.34.0 importlib-resources-6.1.2 jmespath-1.0.1 multiprocess-0.70.16 orjson-3.9.15 platformdirs-4.2.0 pydub-0.25.1 semantic-version-2.10.0 sortedcontainers-2.4.0 tomli-2.0.1 xxhash-3.4.1 yapf-0.40.2

(langchain-ChatGLM-master) E:\workspace\python\langchain-ChatGLM-master>pip uninstall pydantic websockets Found existing installation: pydantic 1.10.13 Uninstalling pydantic-1.10.13: Would remove: c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages\pydantic-1.10.13.dist-info* c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages\pydantic* Proceed (Y/n)? y Successfully uninstalled pydantic-1.10.13 Found existing installation: websockets 12.0 Uninstalling websockets-12.0: Would remove: c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages\websockets-12.0.dist-info* c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages\websockets* Proceed (Y/n)? y Successfully uninstalled websockets-12.0

(langchain-ChatGLM-master) E:\workspace\python\langchain-ChatGLM-master> (langchain-ChatGLM-master) E:\workspace\python\langchain-ChatGLM-master> (langchain-ChatGLM-master) E:\workspace\python\langchain-ChatGLM-master> (langchain-ChatGLM-master) E:\workspace\python\langchain-ChatGLM-master>pip install pydantic==2.0 websockets==11.0 Looking in indexes: https://mirrors.aliyun.com/pypi/simple Collecting pydantic==2.0 Downloading https://mirrors.aliyun.com/pypi/packages/10/e8/c7a1f0dd3d921bccb1d2239b84c894f677eba3950936e9d4c74803ba5bdb/pydantic-2.0-py3-none-any.whl (355 kB) ---------------------------------------- 355.6/355.6 kB 2.0 MB/s eta 0:00:00 Collecting websockets==11.0 Downloading https://mirrors.aliyun.com/pypi/packages/ae/49/67c6beab25556b1afdc5db678357dd3c9bfbe92e1e2faff906260477835f/websockets-11.0-cp311-cp311-win_amd64.whl (124 kB) ---------------------------------------- 124.5/124.5 kB 521.6 kB/s eta 0:00:00 Collecting annotated-types>=0.4.0 (from pydantic==2.0) Downloading https://mirrors.aliyun.com/pypi/packages/28/78/d31230046e58c207284c6b2c4e8d96e6d3cb4e52354721b944d3e1ee4aa5/annotated_types-0.6.0-py3-none-any.whl (12 kB) Collecting pydantic-core==2.0.1 (from pydantic==2.0) Downloading https://mirrors.aliyun.com/pypi/packages/9f/57/739d59da677c8288aa9bea9d7446ee72acd2bc37210f350668a498683eea/pydantic_core-2.0.1-cp311-none-win_amd64.whl (1.5 MB) ---------------------------------------- 1.5/1.5 MB 1.1 MB/s eta 0:00:00 Requirement already satisfied: typing-extensions>=4.6.1 in c:\users\13924.conda\envs\langchain-chatglm-master\lib\site-packages (from pydantic==2.0) (4.9.0) Installing collected packages: websockets, pydantic-core, annotated-types, pydantic ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. zhipuai 2.0.1 requires pydantic>=2.5.2, but you have pydantic 2.0 which is incompatible. fastapi 0.109.0 requires pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4, but you have pydantic 2.0 which is incompatible. fschat 0.2.35 requires pydantic<2,>=1, but you have pydantic 2.0 which is incompatible. Successfully installed annotated-types-0.6.0 pydantic-2.0 pydantic-core-2.0.1 websockets-11.0

按照以上处理提示错误

limi1 avatar Feb 29 '24 02:02 limi1

image

limi1 avatar Feb 29 '24 02:02 limi1

zhipuai 不要装

zRzRzRzRzRzRzR avatar Mar 02 '24 06:03 zRzRzRzRzRzRzR