簡體   English   中英

安裝包后,Python中的請求不起作用

[英]Requests in Python doesn't work after installation package

因此,我使用以下方法安裝了Python請求:

$ git clone git://github.com/requests/requests.git

$ curl -OL https://github.com/requests/requests/tarball/master

$ cd requests $ pip install .

pip install requests

C:\Users\anonr>pip list
Package    Version
---------- --------
certifi    2019.3.9
chardet    3.0.4
idna       2.8
pip        19.0.3
requests   2.21.0
setuptools 40.8.0
urllib3    1.24.1

我在這里找到的:

http://docs.python-requests.org/en/latest/user/install/

我在Python27 / lib / site-packages / requests中的軟件包上有請求

但是,當我嘗試在具有import requests;的腳本上使用它時import requests; 它不起作用。

就像我根本沒有安裝它。

有誰知道如何解決這個問題? 我嘗試重新安裝並再次安裝,但仍然...

請幫忙。

您是否使用虛擬環境? 可能是因為您沒有在虛擬環境中安裝請求包。

您是否嘗試過使用此方法:

pip install requests

您是否進行了標准的pip安裝?

pip install requests

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM