开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 191|回复: 5
收起左侧

[完成] py安装依赖问题求助

 关闭 [复制链接]
结帖率:100% (10/10)
发表于 2025-1-4 19:55:36 | 显示全部楼层 |阅读模式   江苏省南通市
10精币
用命令 pip3 install -r requirements.txt 安装依赖文件时,frida安装不成功,另外2个成功,求大佬们帮忙看下是哪里的问题?下面是输出日志


C:\WeChatOpenDevTools-Python-main>pip install -r requirements.txt
Collecting frida==14.1.3 (from -r requirements.txt (line 1))
  Using cached frida-14.1.3.tar.gz (7.5 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: psutil==5.9.7 in c:\program files\phthon\lib\site-packages (from -r requirements.txt (line 2)) (5.9.7)
Requirement already satisfied: pyfiglet==1.0.2 in c:\program files\phthon\lib\site-packages (from -r requirements.txt (line 3)) (1.0.2)
Building wheels for collected packages: frida
  Building wheel for frida (pyproject.toml) ... error
  error: subprocess-exited-with-error


  × Building wheel for frida (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [81 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build\lib.win-amd64-cpython-39\frida
      copying frida\core.py -> build\lib.win-amd64-cpython-39\frida
      copying frida\__init__.py -> build\lib.win-amd64-cpython-39\frida
      running build_ext
      looking for prebuilt extension in home directory, i.e. C:\Users\Administrator/frida-14.1.3-py3.9-win-amd64.egg
      prebuilt extension not found in home directory, will try downloading it
      querying pypi for available prebuilds
      Traceback (most recent call last):
        File "<string>", line 98, in build_extension
      FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Administrator/frida-14.1.3-py3.9-win-amd64.egg'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Program Files\phthon\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Program Files\phthon\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 "C:\Program Files\phthon\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\build_meta.py", line 438, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\build_meta.py", line 426, in _build
          return self._build_with_temp_dir(
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\build_meta.py", line 407, in _build_with_temp_dir
          self.run_setup()
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 152, in <module>
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 183, in setup
          return run_commands(dist)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands
          dist.run_commands()
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\dist.py", line 995, in run_command
          super().run_command(command)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
          cmd_obj.run()
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\command\bdist_wheel.py", line 381, in run
          self.run_command("build")
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\dist.py", line 995, in run_command
          super().run_command(command)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
          cmd_obj.run()
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 135, in run
          self.run_command(cmd_name)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\dist.py", line 995, in run_command
          super().run_command(command)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command
          cmd_obj.run()
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 99, in run
          _build_ext.run(self)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 359, in run
          self.build_extensions()
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 476, in build_extensions
          self._build_extensions_serial()
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-l8rqakh_\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 502, in _build_extensions_serial
          self.build_extension(ext)
        File "<string>", line 105, in build_extension
        File "C:\Program Files\phthon\lib\xmlrpc\client.py", line 1116, in __call__
          return self.__send(self.__name, args)
        File "C:\Program Files\phthon\lib\xmlrpc\client.py", line 1458, in __request
          response = self.__transport.request(
        File "<string>", line 57, in request
        File "C:\Program Files\phthon\lib\xmlrpc\client.py", line 1348, in parse_response
          return u.close()
        File "C:\Program Files\phthon\lib\xmlrpc\client.py", line 662, in close
          raise Fault(**self._stack[0])
      xmlrpc.client.Fault: <Fault -32500: 'RuntimeError: PyPI no longer supports the XMLRPC package_releases method. Use JSON or Simple API instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.'>
      [end of output]

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

C:\WeChatOpenDevTools-Python-main>





最佳答案

查看完整内容

pip install --upgrade pip setuptools 这样试试呢
结帖率:54% (7/13)
发表于 2025-1-4 19:55:37 | 显示全部楼层   浙江省嘉兴市
pip install --upgrade pip setuptools  这样试试呢

评分

参与人数 1荣誉 +1 收起 理由
笨潴 + 1 热心帮助他人,荣誉+1,希望继续努力(*^__^*) 嘻嘻!

查看全部评分

回复

使用道具 举报

结帖率:97% (85/88)

签到天数: 1 天

发表于 2025-1-4 20:27:42 | 显示全部楼层   河北省沧州市
这段内容是在使用 `pip` 命令安装 `requirements.txt` 文件中列出的依赖包时出现的报错信息,下面来详细分析一下报错原因及含义:

### 整体情况说明
`pip` 尝试安装 `requirements.txt` 里指定的包,其中 `frida==14.1.3` 在构建 wheel 包(一种 Python 安装包格式,方便安装和分发)的过程中出现了错误,导致整个安装流程未能顺利完成,而 `psutil` 和 `pyfiglet` 这两个包由于已经满足版本要求(之前已安装)所以没有再次安装。

### 具体报错分析
1. **`frida` 包构建 `wheel` 出错**:
    - 首先,`pip` 在安装 `frida` 包时,会先获取它的源码(`Using cached frida-14.1.3.tar.gz (7.5 kB)` 表示使用了缓存的源码压缩包),然后开始执行构建 `wheel` 的相关流程(`Building wheels for collected packages: frida`)。
    - 但是在构建 `wheel` 的过程中(`Building wheel for frida (pyproject.toml)... error`)出现了错误,具体来看:
        - 它先执行了一系列常规的构建步骤,如 `running bdist_wheel`(运行构建 `wheel` 命令)、`running build`(构建项目)、`running build_py`(构建Python模块相关内容)等,在构建扩展模块(`running build_ext`)这一步时出了问题。
        - 程序先是尝试在用户主目录(`C:\Users\Administrator`)下查找预构建的扩展(`looking for prebuilt extension in home directory, i.e. C:\Users\Administrator/frida-14.1.3-py3.9-win-amd64.egg`),没找到后打算从网络下载(`prebuilt extension not found in home directory, will try downloading it`),接着去 PyPI(Python Package Index,Python 包索引)cha询可用的预构建版本(`querying pypi for available prebuilds`)时出现了异常。
2. **具体异常详情**:
    - 出现了 `FileNotFoundError`,提示找不到文件或目录 `C:\\Users\\Administrator/frida-14.1.3-py3.9-win-amd64.egg`,也就是前面说的预构建扩展没找到对应的文件。
    - 在处理这个找不到文件的异常过程中,又触发了另一个异常,关键错误信息是 `xmlrpc.client.Fault: <Fault -32500: 'RuntimeError: PyPI no longer supports the XMLRPC package_releases method. Use JSON or Simple API instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.'>`,这表明 `pip` 在尝试通过 XMLRPC 方式与 PyPI 交互去获取 `frida` 包相关信息(比如查找可用的预构建版本等操作)时,由于 PyPI 已经不再支持 XMLRPC 的 `package_releases` 方法了,所以导致操作失败,进而使得 `frida` 包的 `wheel` 构建无法继续进行下去。

### 总结与提示
最后提示 `Failed to build frida` 以及 `Failed to build installable wheels for some pyproject.toml based projects (frida)`,说明 `frida` 包没能成功构建,整体基于 `pyproject.toml` 的项目(这里就是 `frida` 这个包相关的安装构建项目)因为这个原因没能完整安装好。

要解决这个问题,可能需要按照报错提示中给出的链接(https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods )去了解如何使用 JSON 或 Simple API 来替代原来的 XMLRPC 方式与 PyPI 交互进行包的相关操作,或者检查 `frida` 包的安装配置、依赖情况等是否正确,也可以尝试从其他可靠渠道获取已经构建好的 `frida` 包对应的 `wheel` 文件来进行安装。

问豆包Ai
回复

使用道具 举报

结帖率:100% (58/58)

签到天数: 1 天

发表于 2025-1-4 20:57:32 | 显示全部楼层   江西省南昌市
根据你的输出日志,frida 包在安装过程中出现了问题,原因是它试图使用已被废弃的 PyPI XMLRPC 接口cha询预构建的扩展包,这导致了构建失败。

以下是解决该问题的一些方法:

解决方法 1:安装预构建的 frida 包
frida 提供了预构建的二进制包,可以直接下载对应的版本并安装。运行以下命令尝试直接安装预构建的包:

bash
复制代码
pip install frida==14.1.3 --use-pep517
如果此方法不起作用,可以手动指定安装不同的版本(如 15.x 或 16.x),因为较新的版本可能已修复该问题:

bash
复制代码
pip install frida
解决方法 2:升级 pip 和相关工具
有时问题可能与 pip 或构建工具的版本有关。尝试升级 pip 和 setuptools 后再安装依赖项:

bash
复制代码
pip install --upgrade pip setuptools wheel
pip install frida==14.1.3
解决方法 3:从源代码安装
如果无法通过 PyPI 下载预构建包,可以从源代码安装 frida。

克隆 frida 源代码仓库:

bash
复制代码
git clone https://github.com/frida/frida-python.git
cd frida-python
构建并安装:

bash
复制代码
python setup.py build
python setup.py install
解决方法 4:检查网络和代理配置
如果你的网络环境有限制(如防火墙或代理问题),可能会导致下载失败。尝试设置 PyPI 的镜像源:

bash
复制代码
pip install frida==14.1.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
解决方法 5:使用虚拟环境
有时问题可能与当前 Python 环境冲突,可以尝试使用虚拟环境安装依赖项:

创建虚拟环境:

bash
复制代码
python -m venv venv
激活虚拟环境:

Windows:
bash
复制代码
venv\Scripts\activate
macOS/Linux:
bash
复制代码
source venv/bin/activate
安装依赖项:

bash
复制代码
pip install -r requirements.txt
解决方法 6:联系 frida 的维护者
如果以上方法均失败,可能需要联系 frida 的维护者,报告问题,并尝试使用较新的版本。

尝试以上方法,看看是否能解决问题。如果问题仍然存在,请提供更多信息(如操作系统版本、Python 版本等),以便进一步协助!
回复

使用道具 举报

结帖率:83% (10/12)

签到天数: 1 天

发表于 2025-1-4 21:18:32 | 显示全部楼层   天津市天津市
哪个错误找哪个 肯定拉取不要那个版本了
回复

使用道具 举报

结帖率:100% (2/2)

签到天数: 2 天

发表于 2025-1-4 22:30:09 | 显示全部楼层   香港特别行政区*
期待作者更多的精彩。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
网站简介:精易论坛成立于2009年,是一个程序设计学习交流技术论坛,隶属于揭阳市揭东区精易科技有限公司所有。
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表