How I can install regex package for python 3.4 without errors?












3















I have a little problem (or a big one?). I want to install regex package
for Python 3.4. But then I use pip or our installation methods I am getting error:




universe@universe-AOD270:~/Downloads/regex-2016.04.25$ python setup.py
install --user
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying Python2/regex.py -> build/lib.linux-x86_64-2.7
copying Python2/_regex_core.py -> build/lib.linux-x86_64-2.7
copying Python2/test_regex.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Python2
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c Python2/_regex.c -o build/temp.linux-x86_64-2.7/Python2/_regex.o
****Python2/_regex.c:46:20: fatal error: Python.h: No such file or directory
compilation terminated.****
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


I think that this problem arise because installer try to install this package into Python2.7 directory, but I am not sure. I try pip installation, launch from interpreter of Python, running through terminal, but have no success.
Please, help me to solve this problem. Thanks in advance.










share|improve this question




















  • 5





    Just install python-dev and python3-dev. Although does Python not have a built-in re module?

    – UniversallyUniqueID
    Apr 26 '16 at 12:20











  • Just to be clear, you are not talking about the built-in regex (re) module, right?

    – don.joey
    Apr 27 '16 at 7:23











  • There is a regex package as well that mostly difference by being non-greedy by default (if I recall correctly).

    – don.joey
    Apr 27 '16 at 7:24











  • to don.joy - I need regex package because it has in finditer() overlapped flags, finditer() in re modul doesn't have such options. I am taking about a separate package 'regex-2016.04.25'.

    – Богдан Іващук
    Apr 27 '16 at 10:46
















3















I have a little problem (or a big one?). I want to install regex package
for Python 3.4. But then I use pip or our installation methods I am getting error:




universe@universe-AOD270:~/Downloads/regex-2016.04.25$ python setup.py
install --user
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying Python2/regex.py -> build/lib.linux-x86_64-2.7
copying Python2/_regex_core.py -> build/lib.linux-x86_64-2.7
copying Python2/test_regex.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Python2
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c Python2/_regex.c -o build/temp.linux-x86_64-2.7/Python2/_regex.o
****Python2/_regex.c:46:20: fatal error: Python.h: No such file or directory
compilation terminated.****
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


I think that this problem arise because installer try to install this package into Python2.7 directory, but I am not sure. I try pip installation, launch from interpreter of Python, running through terminal, but have no success.
Please, help me to solve this problem. Thanks in advance.










share|improve this question




















  • 5





    Just install python-dev and python3-dev. Although does Python not have a built-in re module?

    – UniversallyUniqueID
    Apr 26 '16 at 12:20











  • Just to be clear, you are not talking about the built-in regex (re) module, right?

    – don.joey
    Apr 27 '16 at 7:23











  • There is a regex package as well that mostly difference by being non-greedy by default (if I recall correctly).

    – don.joey
    Apr 27 '16 at 7:24











  • to don.joy - I need regex package because it has in finditer() overlapped flags, finditer() in re modul doesn't have such options. I am taking about a separate package 'regex-2016.04.25'.

    – Богдан Іващук
    Apr 27 '16 at 10:46














3












3








3








I have a little problem (or a big one?). I want to install regex package
for Python 3.4. But then I use pip or our installation methods I am getting error:




universe@universe-AOD270:~/Downloads/regex-2016.04.25$ python setup.py
install --user
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying Python2/regex.py -> build/lib.linux-x86_64-2.7
copying Python2/_regex_core.py -> build/lib.linux-x86_64-2.7
copying Python2/test_regex.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Python2
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c Python2/_regex.c -o build/temp.linux-x86_64-2.7/Python2/_regex.o
****Python2/_regex.c:46:20: fatal error: Python.h: No such file or directory
compilation terminated.****
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


I think that this problem arise because installer try to install this package into Python2.7 directory, but I am not sure. I try pip installation, launch from interpreter of Python, running through terminal, but have no success.
Please, help me to solve this problem. Thanks in advance.










share|improve this question
















I have a little problem (or a big one?). I want to install regex package
for Python 3.4. But then I use pip or our installation methods I am getting error:




universe@universe-AOD270:~/Downloads/regex-2016.04.25$ python setup.py
install --user
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying Python2/regex.py -> build/lib.linux-x86_64-2.7
copying Python2/_regex_core.py -> build/lib.linux-x86_64-2.7
copying Python2/test_regex.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Python2
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c Python2/_regex.c -o build/temp.linux-x86_64-2.7/Python2/_regex.o
****Python2/_regex.c:46:20: fatal error: Python.h: No such file or directory
compilation terminated.****
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


I think that this problem arise because installer try to install this package into Python2.7 directory, but I am not sure. I try pip installation, launch from interpreter of Python, running through terminal, but have no success.
Please, help me to solve this problem. Thanks in advance.







python regex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 26 '16 at 12:19









Videonauth

24.3k1271100




24.3k1271100










asked Apr 26 '16 at 12:05









Богдан ІващукБогдан Іващук

1613




1613








  • 5





    Just install python-dev and python3-dev. Although does Python not have a built-in re module?

    – UniversallyUniqueID
    Apr 26 '16 at 12:20











  • Just to be clear, you are not talking about the built-in regex (re) module, right?

    – don.joey
    Apr 27 '16 at 7:23











  • There is a regex package as well that mostly difference by being non-greedy by default (if I recall correctly).

    – don.joey
    Apr 27 '16 at 7:24











  • to don.joy - I need regex package because it has in finditer() overlapped flags, finditer() in re modul doesn't have such options. I am taking about a separate package 'regex-2016.04.25'.

    – Богдан Іващук
    Apr 27 '16 at 10:46














  • 5





    Just install python-dev and python3-dev. Although does Python not have a built-in re module?

    – UniversallyUniqueID
    Apr 26 '16 at 12:20











  • Just to be clear, you are not talking about the built-in regex (re) module, right?

    – don.joey
    Apr 27 '16 at 7:23











  • There is a regex package as well that mostly difference by being non-greedy by default (if I recall correctly).

    – don.joey
    Apr 27 '16 at 7:24











  • to don.joy - I need regex package because it has in finditer() overlapped flags, finditer() in re modul doesn't have such options. I am taking about a separate package 'regex-2016.04.25'.

    – Богдан Іващук
    Apr 27 '16 at 10:46








5




5





Just install python-dev and python3-dev. Although does Python not have a built-in re module?

– UniversallyUniqueID
Apr 26 '16 at 12:20





Just install python-dev and python3-dev. Although does Python not have a built-in re module?

– UniversallyUniqueID
Apr 26 '16 at 12:20













Just to be clear, you are not talking about the built-in regex (re) module, right?

– don.joey
Apr 27 '16 at 7:23





Just to be clear, you are not talking about the built-in regex (re) module, right?

– don.joey
Apr 27 '16 at 7:23













There is a regex package as well that mostly difference by being non-greedy by default (if I recall correctly).

– don.joey
Apr 27 '16 at 7:24





There is a regex package as well that mostly difference by being non-greedy by default (if I recall correctly).

– don.joey
Apr 27 '16 at 7:24













to don.joy - I need regex package because it has in finditer() overlapped flags, finditer() in re modul doesn't have such options. I am taking about a separate package 'regex-2016.04.25'.

– Богдан Іващук
Apr 27 '16 at 10:46





to don.joy - I need regex package because it has in finditer() overlapped flags, finditer() in re modul doesn't have such options. I am taking about a separate package 'regex-2016.04.25'.

– Богдан Іващук
Apr 27 '16 at 10:46










1 Answer
1






active

oldest

votes


















0














It's because of you didn't have python-dev or python3-dev packages due to your python versoin.



Just install them through 'pip' or 'pip3' package installer and enjoy it!



Note if you find the mentioned packages is installed and your problem is still exist!, you must look for 'Python.h' file in your file system by:



sudo find / -name "Python.h"


and then add listed paths which includes Python.h into your C_INCLUDE_PATH environment variable something like:



export C_INCLUDE_PATH=/usr/include/python3.6m/


and now retry your installation and enjoy!






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f763093%2fhow-i-can-install-regex-package-for-python-3-4-without-errors%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    It's because of you didn't have python-dev or python3-dev packages due to your python versoin.



    Just install them through 'pip' or 'pip3' package installer and enjoy it!



    Note if you find the mentioned packages is installed and your problem is still exist!, you must look for 'Python.h' file in your file system by:



    sudo find / -name "Python.h"


    and then add listed paths which includes Python.h into your C_INCLUDE_PATH environment variable something like:



    export C_INCLUDE_PATH=/usr/include/python3.6m/


    and now retry your installation and enjoy!






    share|improve this answer






























      0














      It's because of you didn't have python-dev or python3-dev packages due to your python versoin.



      Just install them through 'pip' or 'pip3' package installer and enjoy it!



      Note if you find the mentioned packages is installed and your problem is still exist!, you must look for 'Python.h' file in your file system by:



      sudo find / -name "Python.h"


      and then add listed paths which includes Python.h into your C_INCLUDE_PATH environment variable something like:



      export C_INCLUDE_PATH=/usr/include/python3.6m/


      and now retry your installation and enjoy!






      share|improve this answer




























        0












        0








        0







        It's because of you didn't have python-dev or python3-dev packages due to your python versoin.



        Just install them through 'pip' or 'pip3' package installer and enjoy it!



        Note if you find the mentioned packages is installed and your problem is still exist!, you must look for 'Python.h' file in your file system by:



        sudo find / -name "Python.h"


        and then add listed paths which includes Python.h into your C_INCLUDE_PATH environment variable something like:



        export C_INCLUDE_PATH=/usr/include/python3.6m/


        and now retry your installation and enjoy!






        share|improve this answer















        It's because of you didn't have python-dev or python3-dev packages due to your python versoin.



        Just install them through 'pip' or 'pip3' package installer and enjoy it!



        Note if you find the mentioned packages is installed and your problem is still exist!, you must look for 'Python.h' file in your file system by:



        sudo find / -name "Python.h"


        and then add listed paths which includes Python.h into your C_INCLUDE_PATH environment variable something like:



        export C_INCLUDE_PATH=/usr/include/python3.6m/


        and now retry your installation and enjoy!







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 30 '18 at 13:39

























        answered Jun 29 '18 at 10:29









        AbdolHoseinAbdolHosein

        5618




        5618






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f763093%2fhow-i-can-install-regex-package-for-python-3-4-without-errors%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

            Eduardo VII do Reino Unido