Giter VIP home page Giter VIP logo

Comments (6)

benfred avatar benfred commented on May 20, 2024 2

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.

lawliet89 avatar lawliet89 commented on May 20, 2024 1

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.

marcstreeter avatar marcstreeter commented on May 20, 2024

works with regular python image, it's the alpine images it doesn't work with.

from py-spy.

marcstreeter avatar marcstreeter commented on May 20, 2024

👍

from py-spy.

benfred avatar benfred commented on May 20, 2024

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.

dHannasch avatar dHannasch commented on May 20, 2024
    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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.