(一)Python扩展库的安装和使用

使用pip命令安装扩展库

找到需要安装的库的名称,然后使用命令

pip download PackageName 下载库但不安装
pip install Package 安装扩展库
pip install Package == 10.1.2 安装某个库但10.1.2版本(根据需要选择)
pip install Package.whl 带有.whl后缀,安装某扩展库离线包
pip install Package1 Package2... 一次安装扩展库12...
pip install -r requirements.txt 根据后面的文件下载扩展库
pip install --upgrade Package 更新某个库
pip unistall Package 卸载某个库

常见的pip指令可以在终端里面输入pip来查看

(base) hejing@LOGMacBook-Air ~ % pip
Usage:   
  pip <command> [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  config                      Manage local and global configuration.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  debug                       Show information useful for debugging.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值