'Python - How to check if requests installed correctly
So i'm using import requests in one of my python scripts but i keep getting a large error that looks to be the .get() method that i'm using out of the requests isn't there, or it wasn't installed correctly, now even when i try pip to get to the help menu it isnt doing it correctly. I followed the directions https://pip.pypa.io/en/stable/installing.html here, but even the python get-pip.py won't work? I feel like i am missing something very simple.. any advice? i know i have python installed correctly because whereis python comes back correctly with the location.
cambria@Vayne:~$ pip
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 521, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2632, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2312, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2318, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead
any light on this would help, i have been trying to fix this for a couple days now but im just not sure what isn't installed correctly or what i'm missing
thank you very much! sorry if i'm not clear enough english is my second language
Solution 1:[1]
It probably your internet connection. Try pip install requests if you haven't or not sure you installed it and turn on your internet.
It worked for me!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | King Chudi |
