Python 为 conda 安装 pip3
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44362214/
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
install pip3 for conda
提问by l0o0
Python2.6 was installed by default in my old centos server. Now I want to create a Python3 environment to install python3 specific module by conda
Python2.6 默认安装在我的旧 centos 服务器中。现在我想创建一个 Python3 环境来通过 conda 安装 python3 特定模块
conda create -n py3 python=3.5.3
source activate py3
After activate the py3, I try to install hovercraft by pip3 install hovercraft
, the shell tells "command not found: pip3". At first I thought pip3 was installed with Python3, but the result was not the case.
So I think I can install it manually. The package gzip file was downloaded from python package index, and install by conda install --file hovercraft-2.3.tar.gz
. But it doesn't work.
Now I have two problems:
激活 py3 后,我尝试通过 安装气垫船pip3 install hovercraft
,外壳告诉“找不到命令:pip3”。一开始我以为pip3是用Python3安装的,结果不是这样。
所以我想我可以手动安装它。包 gzip 文件是从python 包索引下载的,并通过conda install --file hovercraft-2.3.tar.gz
. 但它不起作用。
现在我有两个问题:
- how to install pip3 for virtual-env create by conda?
- Is it possible to install python package index downloaded package locally in conda?
- 如何为由 conda 创建的 virtual-env 安装 pip3?
- 是否可以在conda中本地安装python包索引下载包?
回答by yottabytt
pip3 and pip would make a difference only when you are not using any environment managers like virualenv (or) conda. Now as you are creating a conda environment which has python==3.x, pip would be equivalent to pip3.
pip3 和 pip 只有在您不使用任何环境管理器(如 virualenv(或)conda)时才会有所作为。现在,当您创建一个具有 python==3.x 的 conda 环境时,pip 将等同于 pip3。