【问题标题】:"Failed to locate libpython within timeout period." When trying to profile a .py file not in a container with pyflame“未能在超时时间内找到 libpython。”尝试使用 pyflame 分析不在容器中的 .py 文件时
【发布时间】:2019-06-16 11:05:07
【问题描述】:

我正在尝试在我的代码中记录热点,以便能够通过多线程对其进行优化。

我通过第一次运行在容器外安装了 pyflame sudo apt-get install autoconf automake autotools-dev g++ pkg-config python-dev python3-dev libtool make
然后我通过运行
sudo apt-add-repository ppa:trevorjay/pyflame
sudo apt-get update
sudo apt-get install pyflame

使用 Ubuntu PPA Pre-built Package

在尝试跟踪 python 命令时,我不断收到 错误
Failed to locate libpython within timeout period.
收到错误后,我的代码在终端中正常运行。

我的输入命令是:
pyflame 30 --threads -t python3 myfile.py

我对 Linux 比较陌生,所以如果有人能准确地告诉我我错过了什么以及如何解决它,我将不胜感激。

【问题讨论】:

    标签: python multithreading profiling


    【解决方案1】:

    根据这个帖子:https://github.com/uber/pyflame/issues/151

    pyflame 尚不支持 Python3.7

    【讨论】:

      猜你喜欢
      • 2020-05-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多