Skip to content

Python: Missing module *perf* #127

Closed
pmenzel opened this issue Sep 10, 2020 · 4 comments · Fixed by #212
Closed

Python: Missing module *perf* #127

pmenzel opened this issue Sep 10, 2020 · 4 comments · Fixed by #212

Comments

@pmenzel
Copy link
Contributor

pmenzel commented Sep 10, 2020

From the article Analysis of a Python performance issue:

$ sudo python3 -m perf system tune
/pkg/python-3.7.7-0/bin/python3: No module named perf
@niclas
Copy link
Contributor

niclas commented Jan 20, 2022

Try python3 -m pip3 install --user pyperf and then call sudo python3 -m pyperf system tune. I receive a permission error since I've no root privileges but can import the package. Otherwise you would have to install it by conda which we haven't installed afaik.

That being said, is there a real need to get this into the pkg-scripts?

@pmenzel
Copy link
Contributor Author

pmenzel commented Jan 20, 2022

Define “real need”. For me it would be nice to have, and as, we also want the users, who use a lot of Python, to write efficient code, it might make sense having pyperf readily available by default.

@niclas
Copy link
Contributor

niclas commented Jan 20, 2022

These users tend to don't have root privileges. Therefore I'm not sure about the profit for the users of this lib. Furthermore and I might be wrong on this, do they really write that much code on their own which is worth benchmarking or do they most often use libraries like numpy etc.?

And last and least: "If you’re not at all interested in performance, shouldn’t you be in the Python room down the hall?" (Scott Meyers)

@niclas
Copy link
Contributor

niclas commented Jul 15, 2022

# pip3 install --prefix=$PREFIX perf # fails, issue from Paul sep-20, no clue...

@thomas the module name is pyperf not perf. That should be the reason it fails.

@niclas niclas linked a pull request Sep 16, 2022 that will close this issue
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants