Comments (6)
So, alpine python opts out of the manylinux1 wheels: pypa/pip#3969 (comment) . It seems like it's because of a compatibility issue with glibc instead of musl libc that they use.
Its' possible to get py-spy to install on alpine docker linux by following the steps there
/ # echo 'manylinux1_compatible = True' > /usr/local/lib/python3.6/site-packages/_manylinux.py
/ # pip install py-spy
Collecting py-spy
Downloading https://files.pythonhosted.org/packages/f6/bf/1c32d4690d68b5f0e388830531d385f8034d02ccf655d1cfb1cccd9494d3/py_spy-0.1.4-py2.py3-none-manylinux1_x86_64.whl (5.1MB)
100% |████████████████████████████████| 5.2MB 4.0MB/s
Installing collected packages: py-spy
Successfully installed py-spy-0.1.4
But it still doesn't work because of the glibc issues =(.
I'm switching over from using glibc as a dynamic lib, to using musl as a static library to get around some other issues, and I believe once that change has been made this should work.
from py-spy.
Sorry to dig this old issue up. You might want to suggest to users that they rm /usr/local/lib/python3.7/site-packages/_manylinux.py
after doing this. Otherwise, subsequent pip install
usually end up with lots of ldd
errors.
Alternatively, maybe the pip package can distribute binaries that are musl
built instead (if that's not already the case).
from py-spy.
works with regular python image, it's the alpine images it doesn't work with.
from py-spy.
👍
from py-spy.
I pushed the musl libc changes out with v0.1.5 and tested with python:3.6-alpine docker image. With setting that manylinux1 flag everything seems to work when installing from pip (alternatively you can also install using cargo).
discord:~ ben$ docker run -it --cap-add SYS_PTRACE python:3.6-alpine sh
/ # echo 'manylinux1_compatible = True' > /usr/local/lib/python3.6/site-packages/_manylinux.py
/ # pip install py-spy
Collecting py-spy
Downloading https://files.pythonhosted.org/packages/2d/c9/ea1c28b39de630ed2292a20cab7c9af99e09bcddcda6c7e1e0753b3f59bc/py_spy-0.1.5-py2.py3-none-manylinux1_x86_64.whl (2.9MB)
100% |████████████████████████████████| 2.9MB 5.0MB/s
Installing collected packages: py-spy
Successfully installed py-spy-0.1.5
/ # py-spy -- python -c 'while True: print("foo")'
Collecting samples from 'python -c while True: print("foo")' (python v3.6.6)
from py-spy.
git clone https://github.com/benfred/py-spy.git \
&& cd py-spy \
&& pip install --editable . --verbose \
&& cd ..
seems to work as well (without messing with _manylinux.py). Hard to say which is preferable.
from py-spy.
Related Issues (20)
- Elf sbss issue HOT 1
- Option to get native thread ID with best effort HOT 2
- Encounter os error 31 with py-spy record
- Python 3.12 support HOT 10
- Python 3.11 --native profiling fails because of bpo-45256 HOT 1
- Seg fault on py-spy record --subprocesses
- Test `--native` option in CI
- redirect to stdoutput
- py_spy fails to find interpreter on Windows HOT 4
- Assertion errors when HOT 2
- `--native` HOT 2
- Consider moving CLI functionality behind a feature flag
- attempt to subtract with overflow in console_viewer.rs
- libproc v0.13.0 doesn't build for me
- Programmatically start/stop py-spy recording HOT 1
- Panics at times when sampling a Django app HOT 1
- No source distribution files available in the Pypi site
- Flame graphs cpu on-off
- Add build instruction to README
- Use as python library HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-spy.