如何在Python3.4中使用urllib2从API获取信息?

2024-05-16 09:27:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我想从网站上得到国际空间站的经纬度:

https://api.wheretheiss.at/v1/satellites/25544

我已经设法解决了我需要使用urllib2的问题,但是我无法使用pip安装它,我得到了一个错误:

Could not find a version that satisfies the requirement urllib2 <from the version: > 
No matching distribution found for urllib2 

有人能告诉我如何安装urllib2以及获取经纬度所需的代码吗?谢谢。


Tags: pipthehttpsapi网站versionurllib2空间站