linux pip命令,Linux pip 命令 command not found pip 命令详解 pip 命令未找到 pip 命令安装 - CommandNotFound ⚡️ 坑否...

显示行号

|

选择喜欢的代码风格

默认

GitHub

Dune

LakeSide

Plateau

Vibrant

Blue

Eighties

Tranquil

pip 命令是 Python 软件包管理器。

pip 命令安装:

-bash: pip command not found

#Debian

apt-get install python-pip

#Ubuntu

apt-get install python-pip

#Arch Linux

pacman -S python-pip

#Kali Linux

apt-get install python-pip

#Fedora

dnf install python-pip

#Raspbian

apt-get install python-pip

pip 命令补充说明:

pip 是 Python 包管理工具,该工具提供了对 Python 包的查找、下载、安装、卸载的功能。

pip 命令语法:

pip [options]

pip3 [options]

pip 命令选项:

#COMMANDS

help Show help for commands.

install Install packages.

uninstall Uninstall packages.

freeze Output installed packages in requirements format.

list List installed packages.

show Show information about installed packages.

search Search PyPI for packages.

wheel Build wheels from your requirements.

#GENERAL OPTIONS

-h, --help

Show more detailed command help.

-v, --verbose

Give more output. Option is additive, and can be used up to 3 times.

-V, --version

Show version and exit.

-q, --quiet

Give less output.

--log-file

Path to a verbose non-appending log, that only logs failures. This log is active by default at ~/.pip/pip.log.

--log

Path to a verbose appending log. This log is inactive by default.

--proxy

Specify a proxy in the form [user:passwd@]proxy.server:port.

--timeout

Set the socket timeout (default 15 seconds).

--exists-action

Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.

--cert

Path to alternate CA bundle.

pip 命令实例:

pip 安装软件包:

pip install package_name

安装特定版本的软件包:

pip install package_name==package_version

pip 升级软件包:

pip install -U package_name

pip 卸载软件包:

pip uninstall package_name

pip 将已安装的软件包保存到文件:

pip freeze > requirements.txt

pip 从文件安装软件包:

pip install -r requirements.txt

pip 命令的坑:

如果 Python2 和 Python3 同时有 pip,则使用方法如下:

#Python2:

python2 -m pip install XXX

#Python3:

python3 -m pip install XXX

pip 命令扩展阅读:

pip 命令评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值