gpt4 book ai didi

python - "Failed to locate libpython within timeout period."尝试使用 pyflame 分析不在容器中的 .py 文件时

转载 作者:太空宇宙 更新时间:2023-11-03 10:49:13 33 4
gpt4 key购买 nike

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

我首先运行在容器外安装了 pyflame sudo apt-get install autoconf automake autotools-dev g++ pkg-config python-dev python3-dev libtool make
然后我通过运行
使用了Ubuntu PPA预建包sudo apt-add-repository ppa:trevorjay/pyflame
sudo apt-get update
sudo apt-get install pyflame

在尝试跟踪 python 命令时,我不断收到错误
未能在超时期限内找到 libpython。
收到错误后,我的代码在终端中正常运行。

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

我是 Linux 的新手,所以如果有人能准确地告诉我我错过了什么以及如何修复它,我将不胜感激。

最佳答案

根据这个线程:https://github.com/uber/pyflame/issues/151

pyflame暂不支持Python3.7

关于python - "Failed to locate libpython within timeout period."尝试使用 pyflame 分析不在容器中的 .py 文件时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54317392/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com