【问题标题】:meet python segmentation fault in ensurepip, but the fault is gone after inserting a print in code在ensurepip中遇到python分段错误,但是在代码中插入打印后错误消失了
【发布时间】:2022-06-10 21:03:31
【问题描述】:

我在 debian 系统上有一个 python 3.7.2。

当我跑步时

/3.7.2/bin/python3.7 -Im ensurepip --upgrade

出错了

Segmentation fault (core dumped)

经过一番挣扎,我发现在某些特定行中插入print后,问题就消失了。

line 116 of 3.7.2/lib/python3.7/ensurepip/__init__.py:

       if verbosity:
            args += ["-" + "v" * verbosity]
        print("XXX-116 before run pip")     // this line do the magic
        return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)

我想知道为什么会这样。有人可以尝试找到一些解释吗?

【问题讨论】:

  • 可能应该与“ensurepip”包的维护者一起讨论这个问题。在他们的存储库上创建一个问题?另外我要删除c标签,因为这个问题与C语言无关。

标签: python-3.x linux


猜你喜欢
  • 2020-06-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-24
相关资源
最近更新 更多