pip安装碰到报错,error: subprocess-exited-with-error @FreeBSD

经常在FreeBSD下pip安装软件包报错,当时归咎于FreeBSD对python支持不好,没有深究。今天才明白,根本不是那么回事!

原来我习惯于pip使用百度镜像,使用命令:

pip config set --user global.index-url https://mirror.baidu.com/pypi/simple

在使用百度镜像的时候,安装pyramid会报错--error: subprocess-exited-with-error

pip install pyramid 
Looking in indexes: https://mirror.baidu.com/pypi/simple
Collecting pyramid
  Using cached https://mirror.baidu.com/pypi/packages/db/41/a2114b8dd2187ae007e022a2baabdc7937cc78211cefc0c01fc5452193af/pyramid-2.0.2-py3-none-any.whl (247 kB)
Collecting hupper>=1.5 (from pyramid)
  Downloading https://mirror.baidu.com/pypi/packages/86/7d/3888833e4f5ea56af4a9935066ec09a83228e533d7b8877f65889d706ee4/hupper-1.12.1-py3-none-any.whl (22 kB)
Collecting plaster (from pyramid)
  Downloading https://mirror.baidu.com/pypi/packages/e7/8b/3f98db1448e3b4d2d142716874a7e02f6101685fdaa0f55a8668e9ffa048/plaster-1.1.2-py2.py3-none-any.whl (11 kB)
Collecting plaster-pastedeploy (from pyramid)
  Downloading https://mirror.baidu.com/pypi/packages/bd/30/2d4cf89035c22a89bf0e34dbc50fdc07c42c9bdc90fd972d495257ad2b6e/plaster_pastedeploy-1.0.1-py2.py3-none-any.whl (7.8 kB)
Requirement already satisfied: setuptools in ./py311/lib/python3.11/site-packages (from pyramid) (65.5.0)
Collecting translationstring>=0.4 (from pyramid)
  Downloading https://mirror.baidu.com/pypi/packages/3b/98/36187601a15e3d37e9bfcf0e0e1055532b39d044353b06861c3a519737a9/translationstring-1.4-py2.py3-none-any.whl (15 kB)
Collecting venusian>=1.0 (from pyramid)
  Downloading https://mirror.baidu.com/pypi/packages/2c/d7/36860f68eb977ad685d0f0fda733eca913dbda1bb29bbc5f1c5ba460201a/venusian-3.1.0-py3-none-any.whl (13 kB)
Collecting webob>=1.8.3 (from pyramid)
  Downloading https://mirror.baidu.com/pypi/packages/62/9c/e94a9982e9f31fc35cf46cdc543a6c2c26cb7174635b5fd25b0bbc6a7bc0/WebOb-1.8.7-py2.py3-none-any.whl (114 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.0/115.0 kB 2.1 MB/s eta 0:00:00
Collecting zope.deprecation>=3.5.0 (from pyramid)
  Downloading https://mirror.baidu.com/pypi/packages/c8/7d/24a23d4d6d93744babfb99266eeb97a25ceae58c0f841a872b51c45ee214/zope.deprecation-5.0-py3-none-any.whl (10 kB)
Collecting zope.interface>=3.8.0 (from pyramid)
  Downloading https://mirror.baidu.com/pypi/packages/09/06/7c1202972bc99dd1b731c3c01157855cbc8d0944894c3b234473b1f4119c/zope.interface-6.4.post2.tar.gz (294 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.5/294.5 kB 1.6 MB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      Looking in indexes: https://mirror.baidu.com/pypi/simple
      WARNING: Skipping page https://mirror.baidu.com/pypi/simple/setuptools/ because the GET request got Content-Type: application/octet-stream. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html
      ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
      ERROR: No matching distribution found for setuptools>=40.8.0
      WARNING: Skipping page https://mirror.baidu.com/pypi/simple/pip/ because the GET request got Content-Type: application/octet-stream. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies 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.
WARNING: Skipping page https://mirror.baidu.com/pypi/simple/pip/ because the GET request got Content-Type: application/octet-stream. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html

修改镜像到清华源:

pip config set --user global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/

再来安装pyramid,这回安装成功了:

pip install pyramid 
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting pyramid
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/db/41/a2114b8dd2187ae007e022a2baabdc7937cc78211cefc0c01fc5452193af/pyramid-2.0.2-py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.3/247.3 kB 3.8 MB/s eta 0:00:00
Collecting hupper>=1.5 (from pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/86/7d/3888833e4f5ea56af4a9935066ec09a83228e533d7b8877f65889d706ee4/hupper-1.12.1-py3-none-any.whl (22 kB)
Collecting plaster (from pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e7/8b/3f98db1448e3b4d2d142716874a7e02f6101685fdaa0f55a8668e9ffa048/plaster-1.1.2-py2.py3-none-any.whl (11 kB)
Collecting plaster-pastedeploy (from pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/bd/30/2d4cf89035c22a89bf0e34dbc50fdc07c42c9bdc90fd972d495257ad2b6e/plaster_pastedeploy-1.0.1-py2.py3-none-any.whl (7.8 kB)
Requirement already satisfied: setuptools in ./py311/lib/python3.11/site-packages (from pyramid) (65.5.0)
Collecting translationstring>=0.4 (from pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3b/98/36187601a15e3d37e9bfcf0e0e1055532b39d044353b06861c3a519737a9/translationstring-1.4-py2.py3-none-any.whl (15 kB)
Collecting venusian>=1.0 (from pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2c/d7/36860f68eb977ad685d0f0fda733eca913dbda1bb29bbc5f1c5ba460201a/venusian-3.1.0-py3-none-any.whl (13 kB)
Collecting webob>=1.8.3 (from pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/62/9c/e94a9982e9f31fc35cf46cdc543a6c2c26cb7174635b5fd25b0bbc6a7bc0/WebOb-1.8.7-py2.py3-none-any.whl (114 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.0/115.0 kB 6.7 MB/s eta 0:00:00
Collecting zope.deprecation>=3.5.0 (from pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c8/7d/24a23d4d6d93744babfb99266eeb97a25ceae58c0f841a872b51c45ee214/zope.deprecation-5.0-py3-none-any.whl (10 kB)
Collecting zope.interface>=3.8.0 (from pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/09/06/7c1202972bc99dd1b731c3c01157855cbc8d0944894c3b234473b1f4119c/zope.interface-6.4.post2.tar.gz (294 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.5/294.5 kB 9.8 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting PasteDeploy>=2.0 (from plaster-pastedeploy->pyramid)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/85/30/cdddd9a88969683a59222a6d61cd6dce923977f2e9f9ffba38e1324149cd/PasteDeploy-3.1.0-py3-none-any.whl (16 kB)
Building wheels for collected packages: zope.interface
  Building wheel for zope.interface (pyproject.toml) ... done
  Created wheel for zope.interface: filename=zope.interface-6.4.post2-cp311-cp311-freebsd_14_1_beta3_amd64.whl size=206203 sha256=4771201a673d2f5d1878475938417748bb076e17eeaa67fff7091f344d57503a
  Stored in directory: /home/skywalk/.cache/pip/wheels/5e/e7/48/0748785c4de0517778f0bf40addef54fcae647983a5ca3636b
Successfully built zope.interface
Installing collected packages: translationstring, zope.interface, zope.deprecation, webob, venusian, plaster, PasteDeploy, hupper, plaster-pastedeploy, pyramid
Successfully installed PasteDeploy-3.1.0 hupper-1.12.1 plaster-1.1.2 plaster-pastedeploy-1.0.1 pyramid-2.0.2 translationstring-1.4 venusian-3.1.0 webob-1.8.7 zope.deprecation-5.0 zope.interface-6.4.post2

试了下,安装gunicorn、g4f等库,也都很顺利。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
问题: pip install pybedtools 安装 error: subprocess-exited-with-error 回答: 当你执行 pip install pybedtools 命令时,如果出现 error: subprocess-exited-with-error 误,可能是由于一些原因导致安装过程中出现了误。为了解决这个问题,你可以尝试以下几个步骤: 1. 确认你的电脑上是否安装了所需的依赖库。pybedtools 可能依赖于其他库,你可以通过运行 pip install 命令来安装这些依赖库。确保你的依赖库已经安装并且是最新版本。 2. 确认你的操作系统和Python版本是否是最新的。某些依赖库只能在特定版本的Python上运行。你可以通过运行 python --version 命令来查看你的Python版本。如果你的Python版本过旧,并且你正在运行一个与Python版本不兼容的库,你可能需要更新你的Python版本。 3. 如果以上步骤都无法解决问题,你可以尝试重新安装Python。你可以通过运行 python -m ensurepip 命令来重新安装Python。这将确保你的Python安装是完整的,并且包含了必要的工具和库。 总之,当你遇到 pip install pybedtools 安装 error: subprocess-exited-with-error 误时,你可以尝试检查依赖库、更新Python版本或重新安装Python来解决问题。 #### 引用[.reference_title] - *1* *2* *3* [pip安装软件包error subprocess-exited-with-error问题记录](https://blog.csdn.net/weixin_53742691/article/details/130931339)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值