Unable to find “setuptools-XX.X.X-pyX.X.egg\EGG-INFO“ when adding binary and data files解决办法

本文介绍了解决使用PyInstaller进行项目打包时出现的错误方法。主要问题是无法找到setuptools的相关文件,通过安装setuptools并手动解压重命名EGG文件解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

报错内容
Unable to find “某个盘:\某个目录\venv\lib\site-packages\setuptools-40.8.0-py3.7.egg\EGG-INFO” when adding binary and data files.

解决办法
使用pip install setuptools安装setuptools工具,如果依然报错找不到
进入 某个盘:\某个目录\venv\lib\site-packages\ 文件下
如下图:

在这里插入图片描述

 

发现setuptools-40.8.0-py3.7.egg是EGG压缩文件,解压,并将文件夹名字改成setuptools-40.8.0-py3.7.egg(会提示重名,这时把压缩包名字改一下就行)

解压并改名后如下图:

在这里插入图片描述

 

然后重新使用pyinstaller打包,问题就解决啦~
 

Getting requirements to build wheel ... canceled ERROR: Operation cancelled by user (pyopenjtalk_test_env) d:\graduate\LangChain\pyopenjtalk-0.4.1>pip install setuptools==57.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting setuptools==57.5.0 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4b/b9/71687c5d2034c863db1db2e0704f5e27581ff3cb44d7f293968c5e08ceb3/setuptools-57.5.0-py3-none-any.whl (819 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.3/819.3 kB 18.0 MB/s eta 0:00:00 Installing collected packages: setuptools Attempting uninstall: setuptools Found existing installation: setuptools 69.0.0 Uninstalling setuptools-69.0.0: Successfully uninstalled setuptools-69.0.0 Successfully installed setuptools-57.5.0 (pyopenjtalk_test_env) d:\graduate\LangChain\pyopenjtalk-0.4.1>pip install pyopenjtalk --no-deps Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting pyopenjtalk Using cached https://pypi.tuna.tsinghua.edu.cn/packages/58/74/ccd31c696f047ba381f9b11a504bf1199756c3f30f3de64e3eeb83e10b4a/pyopenjtalk-0.4.1.tar.gz (1.4 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: pyopenjtalk Building wheel for pyopenjtalk (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for pyopenjtalk (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [74 lines of output] D:\usertemp\pip-build-env-ech844ka\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated !! ******************************************************************************** Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0). By 2026-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! corresp(dist, value, root_dir) D:\usertemp\pip-build-env-ech844ka\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! dist._finalize_license_expression() D:\usertemp\pip-build-env-ech844ka\overlay\Lib\site-packages\setuptools\dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated. !! ******************************************************************************** Please consider removing the following classifiers in favor of a SPDX license expression: License :: OSI Approved :: MIT License See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! self._finalize_license_expression() CMake is in the system path. Version: cmake version 4.0.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). running bdist_wheel running build running build_py creating build\lib.win32-cpython-39\pyopenjtalk copying pyopenjtalk\utils.py -> build\lib.win32-cpython-39\pyopenjtalk copying pyopenjtalk\version.py -> build\lib.win32-cpython-39\pyopenjtalk copying pyopenjtalk\__init__.py -> build\lib.win32-cpython-39\pyopenjtalk running egg_info writing pyopenjtalk.egg-info\PKG-INFO writing dependency_links to pyopenjtalk.egg-info\dependency_links.txt writing requirements to pyopenjtalk.egg-info\requires.txt writing top-level names to pyopenjtalk.egg-info\top_level.txt reading manifest file 'pyopenjtalk.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files found matching '.gitignore' warning: no previously-included files found matching '.gitmodules' warning: no previously-included files found matching '.travis.yml' warning: no previously-included files found matching 'tox.ini' no previously-included directories found matching '.github\*' no previously-included directories found matching 'docs\**' adding license file 'LICENSE.md' writing manifest file 'pyopenjtalk.egg-info\SOURCES.txt' creating build\lib.win32-cpython-39\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\LICENSE_mei_normal.htsvoice -> build\lib.win32-cpython-39\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\README.md -> build\lib.win32-cpython-39\pyopenjtalk\htsvoice copying pyopenjtalk\htsvoice\mei_normal.htsvoice -> build\lib.win32-cpython-39\pyopenjtalk\htsvoice running build_ext Compiling pyopenjtalk\openjtalk.pyx because it changed. [1/1] Cythonizing pyopenjtalk\openjtalk.pyx building 'pyopenjtalk.openjtalk' extension error: Unable to find a compatible Visual Studio installation. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyopenjtalk Failed to build pyopenjtalk ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyopenjtalk)
最新发布
06-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值