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!
python pip python-requests
add a comment |
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!
python pip python-requests
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
add a comment |
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!
python pip python-requests
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
python pip python-requests
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
add a comment |
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
add a comment |
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
...
add a comment |
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
...
add a comment |
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
...
add a comment |
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
...
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
...
answered Nov 11 at 1:04
l'L'l
29.2k54891
29.2k54891
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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