Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/usr/bin/python: No module named flamegraph #19

Open
Miaoishappening opened this issue May 18, 2022 · 1 comment
Open

/usr/bin/python: No module named flamegraph #19

Miaoishappening opened this issue May 18, 2022 · 1 comment

Comments

@Miaoishappening
Copy link

i cannot start it because No module named flamegraph.

but i have installed: pip install git+https://github.com/evanhempel/python-flamegraph.git

'''pip install git+https://github.com/evanhempel/python-flamegraph.git
Collecting git+https://github.com/evanhempel/python-flamegraph.git
Cloning https://github.com/evanhempel/python-flamegraph.git to /tmp/pip-req-build-0o57y8hm
Running command git clone -q https://github.com/evanhempel/python-flamegraph.git /tmp/pip-req-build-0o57y8hm
/home/yiwei/.local/lib/python3.8/site-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
/home/yiwei/.local/lib/python3.8/site-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 1.13.1-unknown is an invalid version and will not be supported in a future release
warnings.warn(
/home/yiwei/.local/lib/python3.8/site-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Building wheels for collected packages: flamegraph
Building wheel for flamegraph (setup.py) ... done
Created wheel for flamegraph: filename=flamegraph-0.1-py3-none-any.whl size=5793 sha256=29005f3f6de44d87677934b3929f9ff5f527d75c4e229a204d17d24b7bde124e
Stored in directory: /tmp/pip-ephem-wheel-cache-x0ptsvmg/wheels/ef/34/64/fb50a5c67924972e8361d0641f1f1b56fa9f1ff8daad2550bb
Successfully built flamegraph
Installing collected packages: flamegraph
Successfully installed flamegraph-0.1
'''

what can i do here?

@aaronweissler
Copy link

Hi @Miaoishappening,

I can not help you directly with your problem, I just wanted to chime in that with Python 3.8 this profiler does not work in general due to #18 and you'd have to use a version with the fix from #17, e. g. the fork at https://github.com/rossmcdonald/python-flamegraph. Installing that did work for me right away in Python 3.9.
However, I've been looking at a lot of different Python profilers recently, and to be honest I'd recommend simply using a different one in the first place, for flamegraphs py-spy could be a good alternative due to it being actively maintained, having a bigger community and being more advanced in terms of features.

Best wishes,
Aaron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants