Importing Requests not Working Python 3.7











up vote
1
down vote

favorite












I'm running the latest Kali Linux with Python 3.7 and am trying to use the requests module. As you can see, I install requests but still cannot import it. Could someone help me reconcile this strange problem?



root@kali:~/Desktop# pip3 install --upgrade requests

Requirement already up-to-date: requests in
/usr/local/lib/python3.7/site-packages (2.20.1)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1
in /usr/local/lib/python3.7/site-packages (from requests) (1.23)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests) (3.0.4)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests) (2018.10.15)
Requirement already satisfied, skipping upgrade: idna<2.8,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests) (2.7)

root@kali:~/Desktop# python3

Python 3.5.6 (default, Sep 29 2018, 21:41:04)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'requests'


Thanks ahead of time for the help!










share|improve this question


















  • 2




    You are running two different versions of Python (3.7 and 3.5.6), you need to install requests for 3.5.6, or set your environment correctly to use the 3.7 version of Python.
    – l'L'l
    Nov 11 at 0:49












  • Thanks for the help. Add this as an answer and I'll accept and upvote it!
    – Nicholas
    Nov 11 at 0:55















up vote
1
down vote

favorite












I'm running the latest Kali Linux with Python 3.7 and am trying to use the requests module. As you can see, I install requests but still cannot import it. Could someone help me reconcile this strange problem?



root@kali:~/Desktop# pip3 install --upgrade requests

Requirement already up-to-date: requests in
/usr/local/lib/python3.7/site-packages (2.20.1)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1
in /usr/local/lib/python3.7/site-packages (from requests) (1.23)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests) (3.0.4)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests) (2018.10.15)
Requirement already satisfied, skipping upgrade: idna<2.8,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests) (2.7)

root@kali:~/Desktop# python3

Python 3.5.6 (default, Sep 29 2018, 21:41:04)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'requests'


Thanks ahead of time for the help!










share|improve this question


















  • 2




    You are running two different versions of Python (3.7 and 3.5.6), you need to install requests for 3.5.6, or set your environment correctly to use the 3.7 version of Python.
    – l'L'l
    Nov 11 at 0:49












  • Thanks for the help. Add this as an answer and I'll accept and upvote it!
    – Nicholas
    Nov 11 at 0:55













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm running the latest Kali Linux with Python 3.7 and am trying to use the requests module. As you can see, I install requests but still cannot import it. Could someone help me reconcile this strange problem?



root@kali:~/Desktop# pip3 install --upgrade requests

Requirement already up-to-date: requests in
/usr/local/lib/python3.7/site-packages (2.20.1)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1
in /usr/local/lib/python3.7/site-packages (from requests) (1.23)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests) (3.0.4)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests) (2018.10.15)
Requirement already satisfied, skipping upgrade: idna<2.8,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests) (2.7)

root@kali:~/Desktop# python3

Python 3.5.6 (default, Sep 29 2018, 21:41:04)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'requests'


Thanks ahead of time for the help!










share|improve this question













I'm running the latest Kali Linux with Python 3.7 and am trying to use the requests module. As you can see, I install requests but still cannot import it. Could someone help me reconcile this strange problem?



root@kali:~/Desktop# pip3 install --upgrade requests

Requirement already up-to-date: requests in
/usr/local/lib/python3.7/site-packages (2.20.1)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1
in /usr/local/lib/python3.7/site-packages (from requests) (1.23)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests) (3.0.4)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests) (2018.10.15)
Requirement already satisfied, skipping upgrade: idna<2.8,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests) (2.7)

root@kali:~/Desktop# python3

Python 3.5.6 (default, Sep 29 2018, 21:41:04)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'requests'


Thanks ahead of time for the help!







python pip python-requests






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 11 at 0:48









Nicholas

626




626








  • 2




    You are running two different versions of Python (3.7 and 3.5.6), you need to install requests for 3.5.6, or set your environment correctly to use the 3.7 version of Python.
    – l'L'l
    Nov 11 at 0:49












  • Thanks for the help. Add this as an answer and I'll accept and upvote it!
    – Nicholas
    Nov 11 at 0:55














  • 2




    You are running two different versions of Python (3.7 and 3.5.6), you need to install requests for 3.5.6, or set your environment correctly to use the 3.7 version of Python.
    – l'L'l
    Nov 11 at 0:49












  • Thanks for the help. Add this as an answer and I'll accept and upvote it!
    – Nicholas
    Nov 11 at 0:55








2




2




You are running two different versions of Python (3.7 and 3.5.6), you need to install requests for 3.5.6, or set your environment correctly to use the 3.7 version of Python.
– l'L'l
Nov 11 at 0:49






You are running two different versions of Python (3.7 and 3.5.6), you need to install requests for 3.5.6, or set your environment correctly to use the 3.7 version of Python.
– l'L'l
Nov 11 at 0:49














Thanks for the help. Add this as an answer and I'll accept and upvote it!
– Nicholas
Nov 11 at 0:55




Thanks for the help. Add this as an answer and I'll accept and upvote it!
– Nicholas
Nov 11 at 0:55












1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










Since it appears you have multiple versions of Python installed you'll need to set your environment to use Python 3.7 (currently it's set to 3.5.6, and requests doesn't appear to be installed).



In your .bash_profile you could probably do:



alias python3=/path/to/python3.7


which should use the 3.7 version when you enter python3 ...






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    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%2fstackoverflow.com%2fquestions%2f53244851%2fimporting-requests-not-working-python-3-7%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
    2
    down vote



    accepted










    Since it appears you have multiple versions of Python installed you'll need to set your environment to use Python 3.7 (currently it's set to 3.5.6, and requests doesn't appear to be installed).



    In your .bash_profile you could probably do:



    alias python3=/path/to/python3.7


    which should use the 3.7 version when you enter python3 ...






    share|improve this answer

























      up vote
      2
      down vote



      accepted










      Since it appears you have multiple versions of Python installed you'll need to set your environment to use Python 3.7 (currently it's set to 3.5.6, and requests doesn't appear to be installed).



      In your .bash_profile you could probably do:



      alias python3=/path/to/python3.7


      which should use the 3.7 version when you enter python3 ...






      share|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        Since it appears you have multiple versions of Python installed you'll need to set your environment to use Python 3.7 (currently it's set to 3.5.6, and requests doesn't appear to be installed).



        In your .bash_profile you could probably do:



        alias python3=/path/to/python3.7


        which should use the 3.7 version when you enter python3 ...






        share|improve this answer












        Since it appears you have multiple versions of Python installed you'll need to set your environment to use Python 3.7 (currently it's set to 3.5.6, and requests doesn't appear to be installed).



        In your .bash_profile you could probably do:



        alias python3=/path/to/python3.7


        which should use the 3.7 version when you enter python3 ...







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 11 at 1:04









        l'L'l

        29.2k54891




        29.2k54891






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244851%2fimporting-requests-not-working-python-3-7%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

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python