我試圖讓請求工作。我只是嘗試從文檔中的第一行,在這裏: http://docs.python-requests.org/en/master/所以我假設我有一個不好的安裝?python27 requests.get()遞歸
下面是從上面的例子:
import requests
r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
我不認爲我會得到這種行爲從文檔中提供的第一個例子。
我只是從requests.get()獲得無限遞歸。
File "C:\Python27\lib\requests.py", line 144, in get
return requests.get(url, **kwargs)
File "C:\Python27\lib\requests.py", line 144, in get
return requests.get(url, **kwargs)
File "C:\Python27\lib\requests.py", line 143, in get
with ignore_insecure_warning(**kwargs):
File "C:\Python27\lib\contextlib.py", line 17, in __enter__
return self.gen.next()
File "C:\Python27\lib\requests.py", line 103, in ignore_insecure_warning
with warnings.catch_warnings():
RuntimeError: maximum recursion depth exceeded
我不知道如果我總有Python或安裝不正確的庫,因爲 我也得到點子
pip install anythingAtAll
相關的錯誤打開我與標籤的Atom文本編輯器:「弄點子.py「,」安裝「&」anythingAtAll「但不安裝。
如果我卸載atom,pip工作正常。我沒有看到其他機器上的這些行爲。我嘗試了一個全新安裝的python &原子,它不能解決pip錯誤。
聽起來像是'pip'是綁定到Atom來打開文件,而不是Python安裝工具 –
'requests.py'不是'python-requests.org'文件的庫,因爲這是一個*包*。不知道確切的是什麼。 –
此外,我期望'請求'生活在'C:\ Python27 \ lib \ site-packages'中,而不是'C:\ Python27 \ lib'。 –