python的基本操作

python安装第三方库

方法一:直接在cmd中使用pip install安装

python3.7 -m pip install --upgrade pip  #可能需要升级pip
pip intsall requests #安装requests库

方法二:使用pychram安装

mac中pycharm->preferences,或者使用快捷键command+,

 

 

点击“+”

 

 

 

可以安装第三方库

 

更改python的更新源

(1)pychram中更改源

 

 

 

 

点击“manage repositories”打开存放源的地址。

 

 

 

国内的源主要由

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/ 

豆瓣:http://pypi.douban.com/simple/

 

(2) pip install -i 指定更新源

pip3 install -i https://pypi.doubanio.com/simple/ 包名

 

posted @ 2020-08-31 23:46  小小小小晓白  阅读(45)  评论(0)    收藏  举报