首页 > 其他分享 >ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyStemmer) 解决办法

ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyStemmer) 解决办法

时间:2024-09-18 15:21:00浏览次数:14  
标签:pyproject py based setup PyStemmer build install pip

问题描述

安装fastembed包的时候发现在PyStemmer这一步的时候报错:

Building wheels for collected packages: PyStemmer
  Building wheel for PyStemmer (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      D:\anaconda\envs\patient\lib\site-packages\setuptools\__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      running bdist_wheel
      running build
      running build_ext
      cythoning src/Stemmer.pyx to src\Stemmer.c
      c:\users\niede\appdata\local\temp\pip-install-2e_dgeos\pystemmer_8047ca4648ab4e29ab2e31422b306fc5\.eggs\cython-0.29.37-py3.9.egg\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\niede\AppData\Local\Temp\pip-install-2e_dgeos\pystemmer_8047ca4648ab4e29ab2e31422b306fc5\src\Stemmer.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      building 'Stemmer' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyStemmer
  Running setup.py clean for PyStemmer
Failed to build PyStemmer
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyStemmer)

(patient) E:\AI_Patient-master\my_base_images>pip install PyStemmer==2.2.0
Collecting PyStemmer==2.2.0
  Downloading PyStemmer-2.2.0.tar.gz (698 kB)
     ---------------------------------------- 698.7/698.7 kB 29.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\niede\AppData\Local\Temp\pip-install-nhcfl0jw\pystemmer_6348aa74633142a0a7f53cc08836c65d\setup.py", line 199, in <module>
          ['src/Stemmer.pyx'] + list(LIBRARY_SOURCE_CODE.source_code_paths()),
        File "C:\Users\niede\AppData\Local\Temp\pip-install-nhcfl0jw\pystemmer_6348aa74633142a0a7f53cc08836c65d\setup.py", line 85, in source_code_paths
          for line in self.iter_manifest_lines():
        File "C:\Users\niede\AppData\Local\Temp\pip-install-nhcfl0jw\pystemmer_6348aa74633142a0a7f53cc08836c65d\setup.py", line 74, in iter_manifest_lines
          with open(self.manifest_file_path) as file:
      FileNotFoundError: [Errno 2] No such file or directory: 'libstemmer_c-2.2.0\\mkinc_utf8.mak'
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

(patient) E:\AI_Patient-master\my_base_images>pip install wheel
Requirement already satisfied: wheel in d:\anaconda\envs\patient\lib\site-packages (0.44.0)

(patient) E:\AI_Patient-master\my_base_images>pip install PyStemmer==2.1.0
ERROR: Could not find a version that satisfies the requirement PyStemmer==2.1.0 (from versions: 1.1.0, 1.2.0, 1.3.0, 2.0.0, 2.0.0.1, 2.0.1, 2.2.0, 2.2.0.1)
ERROR: No matching distribution found for PyStemmer==2.1.0

(patient) E:\AI_Patient-master\my_base_images>pip install PyStemmer==2.2.0.1
Collecting PyStemmer==2.2.0.1
  Using cached PyStemmer-2.2.0.1.tar.gz (303 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: PyStemmer
  Building wheel for PyStemmer (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      D:\anaconda\envs\patient\lib\site-packages\setuptools\__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      running bdist_wheel
      running build
      running build_ext
      cythoning src/Stemmer.pyx to src\Stemmer.c
      c:\users\niede\appdata\local\temp\pip-install-t5k_cnlf\pystemmer_5465a1e7a6734cdcb0bec422fa83ffe5\.eggs\cython-0.29.37-py3.9.egg\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\niede\AppData\Local\Temp\pip-install-t5k_cnlf\pystemmer_5465a1e7a6734cdcb0bec422fa83ffe5\src\Stemmer.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      building 'Stemmer' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyStemmer
  Running setup.py clean for PyStemmer
Failed to build PyStemmer
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyStemmer)

解决方案:

打开网址如下:

https://pypi.org/

在搜索框里搜PyStemmer,看到最新的安装包是这个:
在这里插入图片描述
点进去download file之后解压出来一个文件夹如下:
在这里插入图片描述
进入conda环境,输入以下两行命令:

python setup.py build
python setup.py install

这个时候可能会报错:

(patient) E:\PyStemmer-2.2.0.1>python setup.py build
Downloading https://snowballstem.org/dist/libstemmer_c-2.2.0.tar.gz... DONE
Checking that SHA256 of libstemmer_c-2.2.0.tar.gz is b941d9fe9cf36b4e2f8d3873cd4d8b8775bd94867a1df8d8c001bb8b688377c3... SHA256 is b941d9fe9cf36b4e2f8d3873cd4d8b8775bd94867a1df8d8c001bb8b688377c3. OK
Extracting libstemmer_c-2.2.0.tar.gz... DONE
D:\anaconda\envs\patient\lib\site-packages\setuptools\__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running build
running build_ext
cythoning src/Stemmer.pyx to src\Stemmer.c
e:\pystemmer-2.2.0.1\.eggs\cython-0.29.37-py3.9.egg\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: E:\PyStemmer-2.2.0.1\src\Stemmer.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
building 'Stemmer' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

(patient) E:\PyStemmer-2.2.0.1>python setup.py install
D:\anaconda\envs\patient\lib\site-packages\setuptools\__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running install
D:\anaconda\envs\patient\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
D:\anaconda\envs\patient\lib\site-packages\setuptools\_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  self.initialize_options()
running bdist_egg
running egg_info
writing PyStemmer.egg-info\PKG-INFO
writing dependency_links to PyStemmer.egg-info\dependency_links.txt
writing top-level names to PyStemmer.egg-info\top_level.txt
reading manifest file 'PyStemmer.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file 'PyStemmer.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
skipping 'src\Stemmer.c' Cython extension (up-to-date)
building 'Stemmer' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

这里解决error: Microsoft Visual C++ 14.0 or greater is required.的方法可以参考
https://blog.csdn.net/qq_40298645/article/details/136621656中提到的第三种方法(亲测人在国外第二种方法也没用,还是老老实实离线安装,两分钟就全部装完了)

之后运行上面两行命令就可以成功,最后运行pip install fastembed即可

标签:pyproject,py,based,setup,PyStemmer,build,install,pip
From: https://blog.csdn.net/m0_52261601/article/details/142333942

相关文章

  • GBASEDBTSERVER 环境变量7GBASEDBTSHMBASE 环境变量 (UNIX™)
    GBASEDBTSERVER环境变量GBASEDBTSERVER环境变量指定SQLAPI客户机、DB-Access实用程序或其他GBase8s产品与之建立显式或隐式连接的缺省数据库服务器。必须先设置此环境变量,才能使用GBase8s客户机产品。它具有以下语法。dbservername是缺省数据库服务器的名称。GBA......
  • Based UE_Project Notes
    Bookmarks书签功能:标记特定位置,快速跳转到之前标记的位置添加书签:选择你想要标记的位置,然后使用快捷键(Ctrl+1到Ctrl+9)来添加书签跳转到书签:使用相应的快捷键(1到9)可以快速跳转到已设置的书签位置管理书签:在视角中,可以找到书签管理器,允许查看和删除现有书签。显示帧率......
  • Taobao API interface: Get Taobao product details data based on product ID
    TaobaoproductdetailsdataAPIinterfaceisasetofinterfacesprovidedbyTaobaoOpenPlatformforobtainingdetailedinformationofTaobaoproducts.Throughtheseinterfaces,developerscanintegrateTaobaoproductdataintheirownapplicationsorsy......
  • MGT2IMG Australian-based renewable energy
    Assessment2–GroupAssessmentforMGT2IMGType: GroupReportGroupsize: 3studentseachDocument: MSWordwith12fontsizeand1.5spacingWordcount: 1,000perstudent(10+/-allowed)Referencingstyle.: APA7/8Weight: 30%Due: Sunday,29.09.202......
  • 《赛博朋克2077》游戏启动时闪退提示“缺少ucrtbased.dll文件”该如何解决?赛博朋克207
    在启动《赛博朋克2077》时,若出现闪退并提示“缺少ucrtbased.dll文件”,确实让人头疼。但别慌张,这个问题是能够解决的。您可以尝试重新安装相关运行库,或者从可靠渠道获取该文件并放置到指定位置。具体该怎么操作?本篇将为大家带来《赛博朋克2077》游戏启动时闪退提示“缺少ucrtbas......
  • Lecture 10 & 11 Real-time Physically-based Materials (surface model)
    Lecture10Real-timePhysically-basedMaterials(surfacemodelsandcont.)PBRandPBRMaterialsPhysically-BasedRendering(PBR)基于物理的渲染渲染内的任何事都应该是PBR的材质、光照、相机、光线传播等等不限于材质,但常常指材质PBRmaterialsinRTR......
  • NKGMobaBasedOnET
    介绍基于ET框架致敬LOL的Moba游戏,包含完整的客户端与服务端交互,热更新,基于状态帧同步的战斗系统(包含完整的预测回滚功能),基于双端行为树的技能系统(提供通用的可视化节点编辑器),更多精彩等你发现!对于想系统学习本项目而无从下手的,推荐去看看本项目的Wiki,里面有运行指南和基......
  • AppDomain.CurrentDomain.BaseDirectory是什么
    以下为ai解释,用到的知识点都在此记录下AppDomain.CurrentDomain.BaseDirectory是一个属性,它返回当前应用程序域的基目录,即包含应用程序的目录的路径。这个路径通常是安装应用程序的目录,并且通常以反斜杠(\或者\)结尾。如果你想获取这个路径,你可以直接调用这个属性。解决方案1:s......
  • MIXLORA: Enhancing Large Language Models Fine-Tuning with LoRA-based Mixture of
    本文是LLM系列文章,针对《MIXLORA:EnhancingLargeLanguageModelsFine-TuningwithLoRA-basedMixtureofExperts》的翻译。MIXLORA:通过基于LoRA的专家混合来增强大型语言模型的微调摘要1引言2相关工作3MIXLORA4实验5结论摘要微调大型语言模型(LLM)......
  • 【论文阅读】TBA Faster Large Language Model Training Using SSD Based Activation
    摘要GPU内存容量的增长速度跟不上大型语言模型(llm)的增长速度,阻碍了模型的训练过程。特别是,激活——在前向传播过程中产生的中间张量,并在后向传播中重用——主导着GPU内存的使用。为了应对这一挑战,我们建议TBA将激活有效地卸载到高容量NVMessd上。这种方法通过自适应地将数据传......