You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

源码安装Python3.5后virtualenv中pip出现Segmentation fault求助

背景

我的主要目标是为多个使用旧版Python的项目创建virtualenv,使其与系统版本*(3.10.x)*分离。我使用的是已更新至最新状态的PopOS 22.04系统。

由于这个错误,我甚至无法使用pip。我也查阅了相关资料,但看到的所有解决方案要么会输出日志文件,要么会给出出错原因的其他提示,而我的终端中只有Segmentation fault (core dumped)这一条信息。

在此之前我尝试过使用pyenv,但它存在太多bug,折腾20多个小时后我放弃了……这也是我第一次从源码安装任何软件,但我已经阅读过README文档。

执行的具体步骤

  • 下载Python 3.5.2源码并安装
  • 将文件夹解压到~/Downloads/
  • cd Python-3.5.2/
  • ./configure
  • make
  • sudo make altinstall
  • cd ../../Desktop/
  • whereis python3.5 # 输出 /usr/local/bin/python3.5
  • virtualenv my_venv -p /usr/local/bin/python3.5
  • source my_venv/bin/activate # 激活 (my_venv)
  • python # 打开Python 3.5.2 shell,而非系统的3.10.x
  • quit()
  • pip -h
  • 仅得到如下响应:Segmentation fault (core dumped)……仅此而已,没有任何日志文件的提示来追溯问题根源。尝试安装任何软件都会得到相同的响应。我甚至执行了sudo apt install python3-pip,得到如下结果:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (22.0.2+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我还尝试过……

  • 对Python3.7.5执行了上述步骤,但这次在安装前先运行了make test
  • 目前终端显示:running: test_faulthandler (1 hour 6 min)
  • 我注意到有人说这个测试可能需要几个小时,但它有助于发现一些问题并进行修补等。我会继续等待结果,但……

求助

有没有人遇到过这种情况/知道该怎么办???

感谢!

内容的提问来源于stack exchange,提问作者Action Jackson

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.11 16:25:35