Skip to content
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

安装依赖时出错[Bug]: #1757

Closed
Luffy143 opened this issue May 3, 2024 · 25 comments
Closed

安装依赖时出错[Bug]: #1757

Luffy143 opened this issue May 3, 2024 · 25 comments

Comments

@Luffy143
Copy link

Luffy143 commented May 3, 2024

Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

我分别尝试了安装方法Ⅰ(使用阿里源) 以及window一键安装脚本,在安装依赖时都会出现如下问题:

Screen Shot | 有帮助的截图

Using cached https://mirrors.aliyun.com/pypi/packages/6d/0d/4379e9aa35a444b6440ffe1af4c612533460e0d5ac5c7dca1f96ff6f2e23/spacy-3.0.6.tar.gz (7.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [164 lines of output]

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      int length
 
 
  cdef class Vocab:
      cdef Pool mem
      cpdef readonly StringStore strings
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:28:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
 
 
  cdef class Vocab:
      cdef Pool mem
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:29:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
 
  cdef class Vocab:
      cdef Pool mem
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
      cpdef public object vectors
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:30:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  cdef class Vocab:
      cdef Pool mem
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
      cpdef public object vectors
      cpdef public object _lookups
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:31:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      cdef Pool mem
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
      cpdef public object vectors
      cpdef public object _lookups
      cpdef public object writing_system
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:32:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
      cpdef public object vectors
      cpdef public object _lookups
      cpdef public object writing_system
      cpdef public object get_noun_chunks
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:33:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      cdef float prior_prob
 
 
  cdef class KnowledgeBase:
      cdef Pool mem
      cpdef readonly Vocab vocab
            ^
  ------------------------------------------------------------
 
  spacy\kb.pxd:31:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
  Copied C:\Users\pc\AppData\Local\Temp\pip-install-yq0rftl4\spacy_b36fb7b374a545d08eb98711491acfad\setup.cfg -> C:\Users\pc\AppData\Local\Temp\pip-install-yq0rftl4\spacy_b36fb7b374a545d08eb98711491acfad\spacy\tests\package
  Copied C:\Users\pc\AppData\Local\Temp\pip-install-yq0rftl4\spacy_b36fb7b374a545d08eb98711491acfad\pyproject.toml -> C:\Users\pc\AppData\Local\Temp\pip-install-yq0rftl4\spacy_b36fb7b374a545d08eb98711491acfad\spacy\tests\package
  Cythonizing sources
  Compiling spacy/training/example.pyx because it changed.
  Compiling spacy/parts_of_speech.pyx because it changed.
  Compiling spacy/strings.pyx because it changed.
  Compiling spacy/lexeme.pyx because it changed.
  Compiling spacy/vocab.pyx because it changed.
  Compiling spacy/attrs.pyx because it changed.
  Compiling spacy/kb.pyx because it changed.
  Compiling spacy/ml/parser_model.pyx because it changed.
  Compiling spacy/morphology.pyx because it changed.
  Compiling spacy/pipeline/dep_parser.pyx because it changed.
  Compiling spacy/pipeline/morphologizer.pyx because it changed.
  Compiling spacy/pipeline/multitask.pyx because it changed.
  Compiling spacy/pipeline/ner.pyx because it changed.
  Compiling spacy/pipeline/pipe.pyx because it changed.
  Compiling spacy/pipeline/trainable_pipe.pyx because it changed.
  Compiling spacy/pipeline/sentencizer.pyx because it changed.
  Compiling spacy/pipeline/senter.pyx because it changed.
  Compiling spacy/pipeline/tagger.pyx because it changed.
  Compiling spacy/pipeline/transition_parser.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/arc_eager.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/ner.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/nonproj.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/_state.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/stateclass.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/transition_system.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/_beam_utils.pyx because it changed.
  Compiling spacy/tokenizer.pyx because it changed.
  Compiling spacy/training/align.pyx because it changed.
  Compiling spacy/training/gold_io.pyx because it changed.
  Compiling spacy/tokens/doc.pyx because it changed.
  Compiling spacy/tokens/span.pyx because it changed.
  Compiling spacy/tokens/token.pyx because it changed.
  Compiling spacy/tokens/span_group.pyx because it changed.
  Compiling spacy/tokens/graph.pyx because it changed.
  Compiling spacy/tokens/morphanalysis.pyx because it changed.
  Compiling spacy/tokens/_retokenize.pyx because it changed.
  Compiling spacy/matcher/matcher.pyx because it changed.
  Compiling spacy/matcher/phrasematcher.pyx because it changed.
  Compiling spacy/matcher/dependencymatcher.pyx because it changed.
  Compiling spacy/symbols.pyx because it changed.
  Compiling spacy/vectors.pyx because it changed.
  [ 1/41] Cythonizing spacy/attrs.pyx
  [ 2/41] Cythonizing spacy/kb.pyx
  Traceback (most recent call last):
    File "D:\Software\program\Anaconda3\envs\gptac_venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "D:\Software\program\Anaconda3\envs\gptac_venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "D:\Software\program\Anaconda3\envs\gptac_venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 224, in <module>
    File "<string>", line 211, in setup_package
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: spacy/kb.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

No response

@KunruiHuang
Copy link

KunruiHuang commented May 3, 2024

I also encountered the same problem as you. I tried to run pip install item by item and succeeded.
When installing item by item, some version conflicts may be found, and I think the reason should be that the default version has too strict version requirements

@qq7286590
Copy link

我也是同样的问题,不知道怎么解决,搞了2小时了

@qq7286590
Copy link

ERROR: Cannot install fastapi-cli==0.0.2 and spacy==3.7.4 because these package versions have conflicting dependencies.

The conflict is caused by:
spacy 3.7.4 depends on typer<0.10.0 and >=0.3.0
fastapi-cli 0.0.2 depends on typer>=0.12.3

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 https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@binaryYuki
Copy link
Contributor

Installation Method | 安装方法与平台

Pip Install (I used latest requirements.txt)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

我分别尝试了安装方法Ⅰ(使用阿里源) 以及window一键安装脚本,在安装依赖时都会出现如下问题:

Screen Shot | 有帮助的截图

Using cached https://mirrors.aliyun.com/pypi/packages/6d/0d/4379e9aa35a444b6440ffe1af4c612533460e0d5ac5c7dca1f96ff6f2e23/spacy-3.0.6.tar.gz (7.1 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [164 lines of output]

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      int length
 
 
  cdef class Vocab:
      cdef Pool mem
      cpdef readonly StringStore strings
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:28:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
 
 
  cdef class Vocab:
      cdef Pool mem
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:29:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
 
  cdef class Vocab:
      cdef Pool mem
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
      cpdef public object vectors
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:30:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  cdef class Vocab:
      cdef Pool mem
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
      cpdef public object vectors
      cpdef public object _lookups
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:31:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      cdef Pool mem
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
      cpdef public object vectors
      cpdef public object _lookups
      cpdef public object writing_system
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:32:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      cpdef readonly StringStore strings
      cpdef public Morphology morphology
      cpdef public object vectors
      cpdef public object _lookups
      cpdef public object writing_system
      cpdef public object get_noun_chunks
            ^
  ------------------------------------------------------------
 
  spacy\vocab.pxd:33:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
 
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      cdef float prior_prob
 
 
  cdef class KnowledgeBase:
      cdef Pool mem
      cpdef readonly Vocab vocab
            ^
  ------------------------------------------------------------
 
  spacy\kb.pxd:31:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
  Copied C:\Users\pc\AppData\Local\Temp\pip-install-yq0rftl4\spacy_b36fb7b374a545d08eb98711491acfad\setup.cfg -> C:\Users\pc\AppData\Local\Temp\pip-install-yq0rftl4\spacy_b36fb7b374a545d08eb98711491acfad\spacy\tests\package
  Copied C:\Users\pc\AppData\Local\Temp\pip-install-yq0rftl4\spacy_b36fb7b374a545d08eb98711491acfad\pyproject.toml -> C:\Users\pc\AppData\Local\Temp\pip-install-yq0rftl4\spacy_b36fb7b374a545d08eb98711491acfad\spacy\tests\package
  Cythonizing sources
  Compiling spacy/training/example.pyx because it changed.
  Compiling spacy/parts_of_speech.pyx because it changed.
  Compiling spacy/strings.pyx because it changed.
  Compiling spacy/lexeme.pyx because it changed.
  Compiling spacy/vocab.pyx because it changed.
  Compiling spacy/attrs.pyx because it changed.
  Compiling spacy/kb.pyx because it changed.
  Compiling spacy/ml/parser_model.pyx because it changed.
  Compiling spacy/morphology.pyx because it changed.
  Compiling spacy/pipeline/dep_parser.pyx because it changed.
  Compiling spacy/pipeline/morphologizer.pyx because it changed.
  Compiling spacy/pipeline/multitask.pyx because it changed.
  Compiling spacy/pipeline/ner.pyx because it changed.
  Compiling spacy/pipeline/pipe.pyx because it changed.
  Compiling spacy/pipeline/trainable_pipe.pyx because it changed.
  Compiling spacy/pipeline/sentencizer.pyx because it changed.
  Compiling spacy/pipeline/senter.pyx because it changed.
  Compiling spacy/pipeline/tagger.pyx because it changed.
  Compiling spacy/pipeline/transition_parser.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/arc_eager.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/ner.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/nonproj.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/_state.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/stateclass.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/transition_system.pyx because it changed.
  Compiling spacy/pipeline/_parser_internals/_beam_utils.pyx because it changed.
  Compiling spacy/tokenizer.pyx because it changed.
  Compiling spacy/training/align.pyx because it changed.
  Compiling spacy/training/gold_io.pyx because it changed.
  Compiling spacy/tokens/doc.pyx because it changed.
  Compiling spacy/tokens/span.pyx because it changed.
  Compiling spacy/tokens/token.pyx because it changed.
  Compiling spacy/tokens/span_group.pyx because it changed.
  Compiling spacy/tokens/graph.pyx because it changed.
  Compiling spacy/tokens/morphanalysis.pyx because it changed.
  Compiling spacy/tokens/_retokenize.pyx because it changed.
  Compiling spacy/matcher/matcher.pyx because it changed.
  Compiling spacy/matcher/phrasematcher.pyx because it changed.
  Compiling spacy/matcher/dependencymatcher.pyx because it changed.
  Compiling spacy/symbols.pyx because it changed.
  Compiling spacy/vectors.pyx because it changed.
  [ 1/41] Cythonizing spacy/attrs.pyx
  [ 2/41] Cythonizing spacy/kb.pyx
  Traceback (most recent call last):
    File "D:\Software\program\Anaconda3\envs\gptac_venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "D:\Software\program\Anaconda3\envs\gptac_venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "D:\Software\program\Anaconda3\envs\gptac_venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 224, in <module>
    File "<string>", line 211, in setup_package
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "C:\Users\pc\AppData\Local\Temp\pip-build-env-kqzw44aa\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: spacy/kb.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

No response

Hi,

Can I have your python's version?

@binaryYuki
Copy link
Contributor

I also encountered the same problem as you. I tried to run pip install item by item and succeeded. When installing item by item, some version conflicts may be found, and I think the reason should be that the default version has too strict version requirements.

Hello,

I think the key is that you did not restrict the version while you installed the dependencies by each, which means it will install the latest version automatically. In the specific project, a modified version of gradio was applied, which means pip install gradio won't work. This will also cause conflict with other dependencies. I highly recommend using pip install -r requirements.txt instead.

@binaryYuki
Copy link
Contributor

我也是同样的问题,不知道怎么解决,搞了2小时了

您好,

这个问题应该是由于您安装了更高版本的 fastapi 导致的 请尝试pip install -r requirements.txt -f或者重新建立一个 venv安装 谢谢

@binary-husky
Copy link
Owner

fastapi-cli==0.0.2

I notice a fastapi-cli==0.0.2 was uploaded yesterday, could this package leading to the problem?

@binaryYuki
Copy link
Contributor

fastapi-cli==0.0.2

I notice a fastapi-cli==0.0.2 was uploaded yesterday, could this package leading to the problem?

Macos 测试正常

@binary-husky
Copy link
Owner

binary-husky commented May 4, 2024

maybe pip install fastapi==0.110.3 ?

@Merlinzy
Copy link

Merlinzy commented May 4, 2024

I also encountered the same problem as you. I tried to run pip install item by item and succeeded. When installing item by item, some version conflicts may be found, and I think the reason should be that the default version has too strict version requirements.

Hello,

I think the key is that you did not restrict the version while you installed the dependencies by each, which means it will install the latest version automatically. In the specific project, a modified version of gradio was applied, which means pip install gradio won't work. This will also cause conflict with other dependencies. I highly recommend using pip install -r requirements.txt instead.

我用了pip install -r requirements.txt,我用的python3.10,我重复了几次构建新的env没有效果,我使用win10

@Merlinzy
Copy link

Merlinzy commented May 4, 2024

我尝试一条一条指令输入来安装库,在安装scipdf_parser时收到了这样的提示
(academic) D:\study\chatacademic\gpt_academic>pip install scipdf_parser>=0.52 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. fastapi-cli 0.0.2 requires typer>=0.12.3, but you have typer 0.9.4 which is incompatible.

@binary-husky
Copy link
Owner

binary-husky commented May 4, 2024

请试试在requirement.txt里面加上一行 fastapi==0.110

@binary-husky
Copy link
Owner

请试试在requirement.txt里面加上一行 fastapi==0.110

现在应该大概已经解决了:43ed8cb

@Merlinzy
Copy link

Merlinzy commented May 4, 2024

请试试在requirement.txt里面加上一行 fastapi==0.110

现在应该大概已经解决了:43ed8cb

确实有用,可以运行了,但是冲突依然是存在的

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.
fastapi-cli 0.0.2 requires typer>=0.12.3, but you have typer 0.9.4 which is incompatible.
Successfully installed Markdown-3.6 PyMuPDFb-1.24.1 anthropic-0.25.7 arxiv-2.1.0 beautifulsoup4-4.12.3 dashscope-1.18.0 diskcache-5.6.3 distro-1.9.0 docker-7.0.0 edge-tts-6.1.11 fastapi-0.110.0 feedparser-6.0.10 flaml-2.1.2 latex2mathml-3.77.0 mdtex2html-1.3.0 openai-1.25.1 prompt_toolkit-3.0.43 pyautogen-0.2.27 pymdown-extensions-10.8.1 pymupdf-1.24.2 python-docx-1.1.2 python-markdown-math-0.8 pywin32-306 rjsmin-1.2.2 sgmllib3k-1.0.0 soupsieve-2.5 starlette-0.36.3 termcolor-2.4.0 wcwidth-0.2.13 websocket-client-1.8.0

@binaryYuki
Copy link
Contributor

请试试在requirement.txt里面加上一行 fastapi==0.110

现在应该大概已经解决了:43ed8cb

确实有用,可以运行了,但是冲突依然是存在的

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.
fastapi-cli 0.0.2 requires typer>=0.12.3, but you have typer 0.9.4 which is incompatible.
Successfully installed Markdown-3.6 PyMuPDFb-1.24.1 anthropic-0.25.7 arxiv-2.1.0 beautifulsoup4-4.12.3 dashscope-1.18.0 diskcache-5.6.3 distro-1.9.0 docker-7.0.0 edge-tts-6.1.11 fastapi-0.110.0 feedparser-6.0.10 flaml-2.1.2 latex2mathml-3.77.0 mdtex2html-1.3.0 openai-1.25.1 prompt_toolkit-3.0.43 pyautogen-0.2.27 pymdown-extensions-10.8.1 pymupdf-1.24.2 python-docx-1.1.2 python-markdown-math-0.8 pywin32-306 rjsmin-1.2.2 sgmllib3k-1.0.0 soupsieve-2.5 starlette-0.36.3 termcolor-2.4.0 wcwidth-0.2.13 websocket-client-1.8.0

那如果 pip install typer=0.12.3 呢?

@Merlinzy
Copy link

Merlinzy commented May 4, 2024

请试试在requirement.txt里面加上一行 fastapi==0.110

现在应该大概已经解决了:43ed8cb

确实有用,可以运行了,但是冲突依然是存在的

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.
fastapi-cli 0.0.2 requires typer>=0.12.3, but you have typer 0.9.4 which is incompatible.
Successfully installed Markdown-3.6 PyMuPDFb-1.24.1 anthropic-0.25.7 arxiv-2.1.0 beautifulsoup4-4.12.3 dashscope-1.18.0 diskcache-5.6.3 distro-1.9.0 docker-7.0.0 edge-tts-6.1.11 fastapi-0.110.0 feedparser-6.0.10 flaml-2.1.2 latex2mathml-3.77.0 mdtex2html-1.3.0 openai-1.25.1 prompt_toolkit-3.0.43 pyautogen-0.2.27 pymdown-extensions-10.8.1 pymupdf-1.24.2 python-docx-1.1.2 python-markdown-math-0.8 pywin32-306 rjsmin-1.2.2 sgmllib3k-1.0.0 soupsieve-2.5 starlette-0.36.3 termcolor-2.4.0 wcwidth-0.2.13 websocket-client-1.8.0

那如果 pip install typer=0.12.3 呢?

会引入其他冲突

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.
spacy 3.7.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.3 which is incompatible.
weasel 0.3.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.3 which is incompatible.

@binary-husky
Copy link
Owner

还有什么其他好办法吗

@binary-husky binary-husky pinned this issue May 4, 2024
@binaryYuki
Copy link
Contributor

binaryYuki commented May 4, 2024

@binary-husky

卸载 fastapi-cli 或者降级到 fastapi-cli==0.0.1 可以解决

有趣的这个项目本身似乎用不到这个脚手架?

@binaryYuki
Copy link
Contributor

binaryYuki commented May 4, 2024

cc @Merlinzy 能否麻烦您测试一下这个解决方案并反馈?
卸载 fastapi-cli 或者降级到 fastapi-cli==0.0.1
谢谢!

@Merlinzy
Copy link

Merlinzy commented May 4, 2024

cc @Merlinzy 能否麻烦您测试一下这个解决方案并反馈? 卸载 fastapi-cli 或者降级到 fastapi==0.0.1 谢谢!

卸载 fastapi-cli暂时没有产生影响,项目可以正常运行,fastapi没有0.0.1版本,我想你的意思可能是0.1,我安装了0.1,它不可用。我又重新安装了0.110可以正常运行。
总的来说删掉fastapi-cli增添 fastapi==0.110.0目前来看是可行的,暂时还没遇到什么问题。
我有重新创建了新的环境使用如下requirements.txt安装环境

https://public.agent-matrix.com/publish/gradio-3.32.9-py3-none-any.whl
fastapi==0.110
gradio-client==0.8
pypdf2==2.12.1
zhipuai==2.0.1
tiktoken>=0.3.3
requests[socks]
pydantic==2.5.2
protobuf==3.18
transformers>=4.27.1
scipdf_parser>=0.52
anthropic>=0.18.1
python-markdown-math
pymdown-extensions
websocket-client
beautifulsoup4
prompt_toolkit
latex2mathml
python-docx
mdtex2html
dashscope
pyautogen
colorama
Markdown
pygments
edge-tts
pymupdf
openai
rjsmin
arxiv
numpy
rich

没有遇到任何冲突

@binaryYuki
Copy link
Contributor

@Merlinzy 感谢反馈 是我打错了 我本意是 fastapi-cli 已修正

@Luffy143
Copy link
Author

Luffy143 commented May 4, 2024

@binaryYuki 使用的是python 3.11

@Luffy143 Luffy143 closed this as completed May 4, 2024
@Luffy143 Luffy143 reopened this May 4, 2024
@binaryYuki
Copy link
Contributor

binaryYuki commented May 4, 2024

@binaryYuki 使用的是python 3.11

Hi @Luffy143

能否麻烦您测试一下这个解决方案并反馈?

pip install Cython==0.29.36
pip install spacy==3.0.6 --no-build-isolation

谢谢

@Luffy143
Copy link
Author

Luffy143 commented May 5, 2024

@binaryYuki 使用的是python 3.11

Hi @Luffy143

能否麻烦您测试一下这个解决方案并反馈?

pip install Cython==0.29.36
pip install spacy==3.0.6 --no-build-isolation

谢谢

使用该解决方案会报 Cython.Compiler.Errors.CompileError: spacy/kb.pyx 错误
后续我使用了#1757 (comment) 提供的方法在requirements.txt中添加 fastapi==0.110后解决了该问题,虽然仍会提示

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.
s3fs 2023.3.0 requires fsspec==2023.3.0, but you have fsspec 2024.3.1 which is incompatible.

但项目已经可以正常启动

@Luffy143 Luffy143 closed this as completed May 5, 2024
@rumorgin
Copy link

This problem can be solved by an easy way, just change the version of python to 3.9, namely, when you create a new conda env, type conda create -n gptac_venv python=3.9. Then conda activate gptac_venv and python -m pip install -r requirements.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants