python如何添加最常用的库
对python有众多的第三方库供我们来使用,接下来我来教给大家几种安装第三方库的方法。
方法一:
第一步:
打开pycharm选择“文件”——>设置——>项目:项目名称——>Python项目解释器 打开

第二步:
点击右边的小加号搜索你要下载的库名(这里我用安装dina)直接点击“安装软件包”进行安装。


第三步
点击“确定”,此时已经安装成功。
方法二:打开cmd命令窗口,通过命令 pip install 包名进行第三库安装


方法三:通过国内源进行安装
清华: https://pypi.tuna.tsinghua.edu.cn/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
只需要到cmd当中输入指令pip install -i https源地址 库名 即可