Bash:pip:找不到安装命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30017136/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bash: pip: command not found for an Install
提问by Ricky. Z
I am trying to install pip install twilioonto a raspberry pi for a school project but, I type in the command the it says bash: pip: command not found.I have tried to intall many pip packages, but it still won't read that code. Is there something that I am doing wrong?
我正在尝试将pip install twilio 安装到用于学校项目的树莓派上,但是,我输入了命令,它显示bash: pip: command not found。我试图安装许多 pip 包,但它仍然无法读取该代码。有什么我做错了吗?
回答by DNA
pip
is a package manager specific to Python, and is not installed by default on many systems.
pip
是特定于 Python 的包管理器,默认情况下未安装在许多系统上。
So you first need to install pip
. Assuming you are using raspbian, you need to use the apt-get
command, which is the general-purpose package manager for Debian-based Linux systems such as raspbian:
所以你首先需要安装pip
. 假设您使用的是 raspbian,则需要使用该apt-get
命令,它是基于 Debian 的 Linux 系统(例如 raspbian)的通用包管理器:
sudo apt-get install python3-pip
or the Python 2 version:
或 Python 2 版本:
sudo apt-get install python-pip
then you should be able to install Python packages such as twilio
using pip
.
那么你应该能够安装 Python 包,例如twilio
使用pip
.
See the Raspberry Pi guide for installing Python packages.
请参阅 Raspberry Pi指南以安装 Python 包。