bs4 python module issue











up vote
0
down vote

favorite












When I run the command:



python checker.py capture.xml indication NULL


I get the error:




Traceback (most recent call last): File "checker.py", line 1, in
ModuleNotFoundError: No module named 'bs4'




so I decided install bs4 in Python 24 but when I do:



pip install bs4


I get this message:




Requirement already satisfied: bs4 in c:program
filespython36libsite-packages Requirement already satisfied:
beautifulsoup4 in c:program filespython36libsite-packages (from
bs4) You are using pip version 9.0.1, however version 18.1 is
available. You should consider upgrading via the 'python -m pip
install --upgrade pip' command.




so indeed, the module is in that folder so I added c:program filespython36lib to the path environment variable just in case, but I'm getting the same thing.



Any idea on how to solve this, please?










share|improve this question


















  • 1




    So which version of python are you running? Python 2.4 or python 3.6? You have to add the executable to the path, then ensure the pip bootstrap is on. Then you should call the apropiate pip for the apropiate version.
    – dmb
    Nov 20 at 12:56















up vote
0
down vote

favorite












When I run the command:



python checker.py capture.xml indication NULL


I get the error:




Traceback (most recent call last): File "checker.py", line 1, in
ModuleNotFoundError: No module named 'bs4'




so I decided install bs4 in Python 24 but when I do:



pip install bs4


I get this message:




Requirement already satisfied: bs4 in c:program
filespython36libsite-packages Requirement already satisfied:
beautifulsoup4 in c:program filespython36libsite-packages (from
bs4) You are using pip version 9.0.1, however version 18.1 is
available. You should consider upgrading via the 'python -m pip
install --upgrade pip' command.




so indeed, the module is in that folder so I added c:program filespython36lib to the path environment variable just in case, but I'm getting the same thing.



Any idea on how to solve this, please?










share|improve this question


















  • 1




    So which version of python are you running? Python 2.4 or python 3.6? You have to add the executable to the path, then ensure the pip bootstrap is on. Then you should call the apropiate pip for the apropiate version.
    – dmb
    Nov 20 at 12:56













up vote
0
down vote

favorite









up vote
0
down vote

favorite











When I run the command:



python checker.py capture.xml indication NULL


I get the error:




Traceback (most recent call last): File "checker.py", line 1, in
ModuleNotFoundError: No module named 'bs4'




so I decided install bs4 in Python 24 but when I do:



pip install bs4


I get this message:




Requirement already satisfied: bs4 in c:program
filespython36libsite-packages Requirement already satisfied:
beautifulsoup4 in c:program filespython36libsite-packages (from
bs4) You are using pip version 9.0.1, however version 18.1 is
available. You should consider upgrading via the 'python -m pip
install --upgrade pip' command.




so indeed, the module is in that folder so I added c:program filespython36lib to the path environment variable just in case, but I'm getting the same thing.



Any idea on how to solve this, please?










share|improve this question













When I run the command:



python checker.py capture.xml indication NULL


I get the error:




Traceback (most recent call last): File "checker.py", line 1, in
ModuleNotFoundError: No module named 'bs4'




so I decided install bs4 in Python 24 but when I do:



pip install bs4


I get this message:




Requirement already satisfied: bs4 in c:program
filespython36libsite-packages Requirement already satisfied:
beautifulsoup4 in c:program filespython36libsite-packages (from
bs4) You are using pip version 9.0.1, however version 18.1 is
available. You should consider upgrading via the 'python -m pip
install --upgrade pip' command.




so indeed, the module is in that folder so I added c:program filespython36lib to the path environment variable just in case, but I'm getting the same thing.



Any idea on how to solve this, please?







windows python xml python3






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 9:56









itd

133




133








  • 1




    So which version of python are you running? Python 2.4 or python 3.6? You have to add the executable to the path, then ensure the pip bootstrap is on. Then you should call the apropiate pip for the apropiate version.
    – dmb
    Nov 20 at 12:56














  • 1




    So which version of python are you running? Python 2.4 or python 3.6? You have to add the executable to the path, then ensure the pip bootstrap is on. Then you should call the apropiate pip for the apropiate version.
    – dmb
    Nov 20 at 12:56








1




1




So which version of python are you running? Python 2.4 or python 3.6? You have to add the executable to the path, then ensure the pip bootstrap is on. Then you should call the apropiate pip for the apropiate version.
– dmb
Nov 20 at 12:56




So which version of python are you running? Python 2.4 or python 3.6? You have to add the executable to the path, then ensure the pip bootstrap is on. Then you should call the apropiate pip for the apropiate version.
– dmb
Nov 20 at 12:56










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










It seems likely that your python command is referencing Python 2.4 (or some other installation of Python), while pip is referencing the version of pip installed with Python 3.6 in e.g. C:Program FilesPython36. You can double-check the location of the python.exe called from the command line with where python.



Assuming the location returned by where python isn't e.g. C:Program FilesPython36python.exe, I would suggest checking both your User PATH and System Path environment variables. Make sure that e.g. C:Program FilesPython36 is present and remove any similar references to alternate Python installations.



The other (non-destructive) option is to simply specify the full path to the python.exe you wish to use e.g.:



"C:Program FilesPython36python.exe" checker.py capture.xml indication NULL


Notes





  • Since you have Python 3.6 installed, you may have the Python Launcher for Windows installed as well. If this is the case, you can try replacing python with e.g. py -3.6 like so:



    py -3.6 checker.py capture.xml indication NULL


  • I have made some assumptions about capitalization in the paths above. Obviously, you should use whatever capitalization suits your installation.


  • While I don't believe this is relevant to answering your particular question, as a tip I would suggest installing Python into a directory without spaces (i.e. not C:Program Files). This can help eliminate potential problems with file or folder paths in the future.







share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    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: 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%2fsuperuser.com%2fquestions%2f1376921%2fbs4-python-module-issue%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








    up vote
    0
    down vote



    accepted










    It seems likely that your python command is referencing Python 2.4 (or some other installation of Python), while pip is referencing the version of pip installed with Python 3.6 in e.g. C:Program FilesPython36. You can double-check the location of the python.exe called from the command line with where python.



    Assuming the location returned by where python isn't e.g. C:Program FilesPython36python.exe, I would suggest checking both your User PATH and System Path environment variables. Make sure that e.g. C:Program FilesPython36 is present and remove any similar references to alternate Python installations.



    The other (non-destructive) option is to simply specify the full path to the python.exe you wish to use e.g.:



    "C:Program FilesPython36python.exe" checker.py capture.xml indication NULL


    Notes





    • Since you have Python 3.6 installed, you may have the Python Launcher for Windows installed as well. If this is the case, you can try replacing python with e.g. py -3.6 like so:



      py -3.6 checker.py capture.xml indication NULL


    • I have made some assumptions about capitalization in the paths above. Obviously, you should use whatever capitalization suits your installation.


    • While I don't believe this is relevant to answering your particular question, as a tip I would suggest installing Python into a directory without spaces (i.e. not C:Program Files). This can help eliminate potential problems with file or folder paths in the future.







    share|improve this answer

























      up vote
      0
      down vote



      accepted










      It seems likely that your python command is referencing Python 2.4 (or some other installation of Python), while pip is referencing the version of pip installed with Python 3.6 in e.g. C:Program FilesPython36. You can double-check the location of the python.exe called from the command line with where python.



      Assuming the location returned by where python isn't e.g. C:Program FilesPython36python.exe, I would suggest checking both your User PATH and System Path environment variables. Make sure that e.g. C:Program FilesPython36 is present and remove any similar references to alternate Python installations.



      The other (non-destructive) option is to simply specify the full path to the python.exe you wish to use e.g.:



      "C:Program FilesPython36python.exe" checker.py capture.xml indication NULL


      Notes





      • Since you have Python 3.6 installed, you may have the Python Launcher for Windows installed as well. If this is the case, you can try replacing python with e.g. py -3.6 like so:



        py -3.6 checker.py capture.xml indication NULL


      • I have made some assumptions about capitalization in the paths above. Obviously, you should use whatever capitalization suits your installation.


      • While I don't believe this is relevant to answering your particular question, as a tip I would suggest installing Python into a directory without spaces (i.e. not C:Program Files). This can help eliminate potential problems with file or folder paths in the future.







      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        It seems likely that your python command is referencing Python 2.4 (or some other installation of Python), while pip is referencing the version of pip installed with Python 3.6 in e.g. C:Program FilesPython36. You can double-check the location of the python.exe called from the command line with where python.



        Assuming the location returned by where python isn't e.g. C:Program FilesPython36python.exe, I would suggest checking both your User PATH and System Path environment variables. Make sure that e.g. C:Program FilesPython36 is present and remove any similar references to alternate Python installations.



        The other (non-destructive) option is to simply specify the full path to the python.exe you wish to use e.g.:



        "C:Program FilesPython36python.exe" checker.py capture.xml indication NULL


        Notes





        • Since you have Python 3.6 installed, you may have the Python Launcher for Windows installed as well. If this is the case, you can try replacing python with e.g. py -3.6 like so:



          py -3.6 checker.py capture.xml indication NULL


        • I have made some assumptions about capitalization in the paths above. Obviously, you should use whatever capitalization suits your installation.


        • While I don't believe this is relevant to answering your particular question, as a tip I would suggest installing Python into a directory without spaces (i.e. not C:Program Files). This can help eliminate potential problems with file or folder paths in the future.







        share|improve this answer












        It seems likely that your python command is referencing Python 2.4 (or some other installation of Python), while pip is referencing the version of pip installed with Python 3.6 in e.g. C:Program FilesPython36. You can double-check the location of the python.exe called from the command line with where python.



        Assuming the location returned by where python isn't e.g. C:Program FilesPython36python.exe, I would suggest checking both your User PATH and System Path environment variables. Make sure that e.g. C:Program FilesPython36 is present and remove any similar references to alternate Python installations.



        The other (non-destructive) option is to simply specify the full path to the python.exe you wish to use e.g.:



        "C:Program FilesPython36python.exe" checker.py capture.xml indication NULL


        Notes





        • Since you have Python 3.6 installed, you may have the Python Launcher for Windows installed as well. If this is the case, you can try replacing python with e.g. py -3.6 like so:



          py -3.6 checker.py capture.xml indication NULL


        • I have made some assumptions about capitalization in the paths above. Obviously, you should use whatever capitalization suits your installation.


        • While I don't believe this is relevant to answering your particular question, as a tip I would suggest installing Python into a directory without spaces (i.e. not C:Program Files). This can help eliminate potential problems with file or folder paths in the future.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 21 at 11:46









        Anaksunaman

        5,11321222




        5,11321222






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


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





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2fsuperuser.com%2fquestions%2f1376921%2fbs4-python-module-issue%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

            Сан-Квентин

            Алькесар

            Josef Freinademetz