美文网首页初学者
Python安装第三方库的几种方法

Python安装第三方库的几种方法

作者: R_zb | 来源:发表于2019-10-18 10:44 被阅读0次

    使用环境:

    • PC:Win7
    • Python:Python 3.7.2
    • IDE:PyCharm

    Python第三方库安装方法

    1、pip在线安装

    以pyinstaller为例
    安装最新版本:pip install pyinstaller
    安装指定版本:pip install pyinstaller == 3.3
    指定源安装:pip install -i https://pypi.douban.com/simple/ pyinstaller
    卸载:pip uninstall pyinstaller
    
    豆瓣 http://pypi.douban.com/simple/
    清华 https://pypi.tuna.tsinghua.edu.cn/simple/
    阿里云 http://mirrors.aliyun.com/pypi/simple/
    华中理工大学 http://pypi.hustunique.com/
    山东理工大学 http://pypi.sdutlinux.org/
    中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

    2、手动下载对应压缩包,解压后再使用pip安装

    下载链接:https://pypi.org/

    • 进入该网址,搜索想要安装的第三方库,如图1
    • 搜索结果内选择要安装的包,如图2
    • 点击“Download files”选择要下载的类型(如:rar、tar.gz等)如图3
    • 将下载好的压缩包解压,开始安装
    • 执行安装:python setup.py install
      注:需在cmd内进入到解压文件夹目录内,再执行python setup.py install (如图4



    3、pip本地安装whl文件

    4、pycharm安装



    Blog:

    相关文章

      网友评论

        本文标题:Python安装第三方库的几种方法

        本文链接:https://www.haomeiwen.com/subject/wpwapctx.html