alpine-linux command takes forever

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am experimenting with alpine-linux and it is not working as expected.



I try and use pip install cryptography but it takes forever and stops at this incomprehensible output



Running command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-h925mzyj/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__f
le__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-gdaazboj --python-tag cp36



What can I do about it?







share|improve this question















  • 1




    alpine-linux is not exacly your run-of-the-mill linux...the core libraries are not the same, you might run into some incompatibilities. For certain docker uses, you might be better off with stripped down versions of Ubuntu or Debian.
    – Rui F Ribeiro
    May 29 at 7:35






  • 1




    instead of using pip to install the software, have you tried to install the package supplied by alpine? apk update && apk add py-cryptography
    – GracefulRestart
    May 30 at 1:18














up vote
1
down vote

favorite












I am experimenting with alpine-linux and it is not working as expected.



I try and use pip install cryptography but it takes forever and stops at this incomprehensible output



Running command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-h925mzyj/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__f
le__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-gdaazboj --python-tag cp36



What can I do about it?







share|improve this question















  • 1




    alpine-linux is not exacly your run-of-the-mill linux...the core libraries are not the same, you might run into some incompatibilities. For certain docker uses, you might be better off with stripped down versions of Ubuntu or Debian.
    – Rui F Ribeiro
    May 29 at 7:35






  • 1




    instead of using pip to install the software, have you tried to install the package supplied by alpine? apk update && apk add py-cryptography
    – GracefulRestart
    May 30 at 1:18












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am experimenting with alpine-linux and it is not working as expected.



I try and use pip install cryptography but it takes forever and stops at this incomprehensible output



Running command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-h925mzyj/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__f
le__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-gdaazboj --python-tag cp36



What can I do about it?







share|improve this question











I am experimenting with alpine-linux and it is not working as expected.



I try and use pip install cryptography but it takes forever and stops at this incomprehensible output



Running command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-h925mzyj/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__f
le__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-gdaazboj --python-tag cp36



What can I do about it?









share|improve this question










share|improve this question




share|improve this question









asked May 29 at 7:09









Niklas Rosencrantz

97331137




97331137







  • 1




    alpine-linux is not exacly your run-of-the-mill linux...the core libraries are not the same, you might run into some incompatibilities. For certain docker uses, you might be better off with stripped down versions of Ubuntu or Debian.
    – Rui F Ribeiro
    May 29 at 7:35






  • 1




    instead of using pip to install the software, have you tried to install the package supplied by alpine? apk update && apk add py-cryptography
    – GracefulRestart
    May 30 at 1:18












  • 1




    alpine-linux is not exacly your run-of-the-mill linux...the core libraries are not the same, you might run into some incompatibilities. For certain docker uses, you might be better off with stripped down versions of Ubuntu or Debian.
    – Rui F Ribeiro
    May 29 at 7:35






  • 1




    instead of using pip to install the software, have you tried to install the package supplied by alpine? apk update && apk add py-cryptography
    – GracefulRestart
    May 30 at 1:18







1




1




alpine-linux is not exacly your run-of-the-mill linux...the core libraries are not the same, you might run into some incompatibilities. For certain docker uses, you might be better off with stripped down versions of Ubuntu or Debian.
– Rui F Ribeiro
May 29 at 7:35




alpine-linux is not exacly your run-of-the-mill linux...the core libraries are not the same, you might run into some incompatibilities. For certain docker uses, you might be better off with stripped down versions of Ubuntu or Debian.
– Rui F Ribeiro
May 29 at 7:35




1




1




instead of using pip to install the software, have you tried to install the package supplied by alpine? apk update && apk add py-cryptography
– GracefulRestart
May 30 at 1:18




instead of using pip to install the software, have you tried to install the package supplied by alpine? apk update && apk add py-cryptography
– GracefulRestart
May 30 at 1:18










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










Alpine is a headache distro for most Python packages that ship C/C++ extensions (code written in C/C++ that is compiled to a shared object and loaded in Python via a foreign function library). The reason for that is that is PEP 513 which portability definition between Linux distros, manylinux1, is based on glibc/glibcxx. Since Alpine uses musl libc, no manylinux1 compatible wheel can be installed on Alpine. So when you issue pip install cryptography, the wheel with the compiled extensions is filtered and pip tries to build the package with all the C extensions from source.



installing with the system package manager



This is the preferred way and was mentioned by @GracefulRestart in the comments; use it if you don't need the bleeding edge version of the package. Alpine offers the prebuilt cryptography package, currently it's the cryptography<=2.1.4. Install it with apk:



$ apk add py-cryptography


installing with pip



Should you need the bleeding edge version, you can try building it from source by installing with pip.



Preparing the build environment



You will need the compiler and libraries with header files: musl, OpenSSL, libffi and Python itself:



$ apk add gcc musl-dev libffi-dev openssl-dev python3-dev


Building



pip install pkgname hides the build log by default. To see the complete build log, add -vvv to increase verbosity. (Optional) Also, you can explicitly prohibit installing manylinux1 wheels by adding --no-binary=pkgname so the build from source will be enforced.



$ pip install cryptography -vvv --no-binary=cryptography





share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446618%2falpine-linux-command-takes-forever%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote



    accepted










    Alpine is a headache distro for most Python packages that ship C/C++ extensions (code written in C/C++ that is compiled to a shared object and loaded in Python via a foreign function library). The reason for that is that is PEP 513 which portability definition between Linux distros, manylinux1, is based on glibc/glibcxx. Since Alpine uses musl libc, no manylinux1 compatible wheel can be installed on Alpine. So when you issue pip install cryptography, the wheel with the compiled extensions is filtered and pip tries to build the package with all the C extensions from source.



    installing with the system package manager



    This is the preferred way and was mentioned by @GracefulRestart in the comments; use it if you don't need the bleeding edge version of the package. Alpine offers the prebuilt cryptography package, currently it's the cryptography<=2.1.4. Install it with apk:



    $ apk add py-cryptography


    installing with pip



    Should you need the bleeding edge version, you can try building it from source by installing with pip.



    Preparing the build environment



    You will need the compiler and libraries with header files: musl, OpenSSL, libffi and Python itself:



    $ apk add gcc musl-dev libffi-dev openssl-dev python3-dev


    Building



    pip install pkgname hides the build log by default. To see the complete build log, add -vvv to increase verbosity. (Optional) Also, you can explicitly prohibit installing manylinux1 wheels by adding --no-binary=pkgname so the build from source will be enforced.



    $ pip install cryptography -vvv --no-binary=cryptography





    share|improve this answer

























      up vote
      3
      down vote



      accepted










      Alpine is a headache distro for most Python packages that ship C/C++ extensions (code written in C/C++ that is compiled to a shared object and loaded in Python via a foreign function library). The reason for that is that is PEP 513 which portability definition between Linux distros, manylinux1, is based on glibc/glibcxx. Since Alpine uses musl libc, no manylinux1 compatible wheel can be installed on Alpine. So when you issue pip install cryptography, the wheel with the compiled extensions is filtered and pip tries to build the package with all the C extensions from source.



      installing with the system package manager



      This is the preferred way and was mentioned by @GracefulRestart in the comments; use it if you don't need the bleeding edge version of the package. Alpine offers the prebuilt cryptography package, currently it's the cryptography<=2.1.4. Install it with apk:



      $ apk add py-cryptography


      installing with pip



      Should you need the bleeding edge version, you can try building it from source by installing with pip.



      Preparing the build environment



      You will need the compiler and libraries with header files: musl, OpenSSL, libffi and Python itself:



      $ apk add gcc musl-dev libffi-dev openssl-dev python3-dev


      Building



      pip install pkgname hides the build log by default. To see the complete build log, add -vvv to increase verbosity. (Optional) Also, you can explicitly prohibit installing manylinux1 wheels by adding --no-binary=pkgname so the build from source will be enforced.



      $ pip install cryptography -vvv --no-binary=cryptography





      share|improve this answer























        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        Alpine is a headache distro for most Python packages that ship C/C++ extensions (code written in C/C++ that is compiled to a shared object and loaded in Python via a foreign function library). The reason for that is that is PEP 513 which portability definition between Linux distros, manylinux1, is based on glibc/glibcxx. Since Alpine uses musl libc, no manylinux1 compatible wheel can be installed on Alpine. So when you issue pip install cryptography, the wheel with the compiled extensions is filtered and pip tries to build the package with all the C extensions from source.



        installing with the system package manager



        This is the preferred way and was mentioned by @GracefulRestart in the comments; use it if you don't need the bleeding edge version of the package. Alpine offers the prebuilt cryptography package, currently it's the cryptography<=2.1.4. Install it with apk:



        $ apk add py-cryptography


        installing with pip



        Should you need the bleeding edge version, you can try building it from source by installing with pip.



        Preparing the build environment



        You will need the compiler and libraries with header files: musl, OpenSSL, libffi and Python itself:



        $ apk add gcc musl-dev libffi-dev openssl-dev python3-dev


        Building



        pip install pkgname hides the build log by default. To see the complete build log, add -vvv to increase verbosity. (Optional) Also, you can explicitly prohibit installing manylinux1 wheels by adding --no-binary=pkgname so the build from source will be enforced.



        $ pip install cryptography -vvv --no-binary=cryptography





        share|improve this answer













        Alpine is a headache distro for most Python packages that ship C/C++ extensions (code written in C/C++ that is compiled to a shared object and loaded in Python via a foreign function library). The reason for that is that is PEP 513 which portability definition between Linux distros, manylinux1, is based on glibc/glibcxx. Since Alpine uses musl libc, no manylinux1 compatible wheel can be installed on Alpine. So when you issue pip install cryptography, the wheel with the compiled extensions is filtered and pip tries to build the package with all the C extensions from source.



        installing with the system package manager



        This is the preferred way and was mentioned by @GracefulRestart in the comments; use it if you don't need the bleeding edge version of the package. Alpine offers the prebuilt cryptography package, currently it's the cryptography<=2.1.4. Install it with apk:



        $ apk add py-cryptography


        installing with pip



        Should you need the bleeding edge version, you can try building it from source by installing with pip.



        Preparing the build environment



        You will need the compiler and libraries with header files: musl, OpenSSL, libffi and Python itself:



        $ apk add gcc musl-dev libffi-dev openssl-dev python3-dev


        Building



        pip install pkgname hides the build log by default. To see the complete build log, add -vvv to increase verbosity. (Optional) Also, you can explicitly prohibit installing manylinux1 wheels by adding --no-binary=pkgname so the build from source will be enforced.



        $ pip install cryptography -vvv --no-binary=cryptography






        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jun 3 at 18:33









        hoefling

        408410




        408410






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446618%2falpine-linux-command-takes-forever%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?