安装了包含 Python 3.6 但缺少 pip3 的 Anaconda 4.3.1(64 位),无法安装 tensorflow

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43412245/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 23:01:59  来源:igfitidea点击:

Installed Anaconda 4.3.1 (64-bit) which contains Python 3.6 but pip3 missing, cannot install tensorflow

pythonwindowspipanaconda

提问by Matthias Wolf

I downloaded the latest stable Anaconda install off the Continuum website which turned out to be Anaconda 4.3.1 (64-bit) and comes with Python 3.6.0. I am in a Windows 10 environment.

我从 Continuum 网站下载了最新的稳定版 Anaconda 安装,结果是 Anaconda 4.3.1(64 位)并带有 Python 3.6.0。我在 Windows 10 环境中。

However pip3 is missing and I cannot install any Python 3.x packages via pip3.

但是缺少 pip3,我无法通过 pip3 安装任何 Python 3.x 包。

What am I doing wrong?

我究竟做错了什么?

采纳答案by SerialDev

If you do not have another environment installed python 3+ will default to just pip I believe since pip3 is just an alias for pip.

如果您没有安装其他环境,python 3+ 将默认为 pip 我相信因为 pip3 只是 pip 的别名。

pip install --upgrade pip

or You can do it with the associated Python binary too; if it executable as python3, then use that:

或者您也可以使用关联的 Python 二进制文件来完成;如果它可以作为 python3 执行,那么使用它:

python3 -m pip install --upgrade pip

after that check:

在那次检查之后:

pip --version 

otherwise just try pip-3.6

否则就试试 pip-3.6

for tensorflow on conda:

对于 conda 上的 tensorflow:

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl 

for python 3.6 due to conda providing the 3.5 one: from

对于 python 3.6,由于 conda 提供了 3.5 之一:来自

pip install https://testpypi.python.org/packages/db/d2/876b5eedda1f81d5b5734277a155fa0894d394a7f55efa9946a818ad1190/tensorflow-0.12.1-cp36-cp36m-win_amd64.whl

Since this wheel had a version that is undesirable we could instead install the wheel directly from gohlke's windows binaries repository :
download the wheel for python 3.6 from hereand then install the wheel:

由于这个轮子的版本不受欢迎,我们可以直接从 gohlke 的 windows 二进制文件库安装轮子:
这里下载 python 3.6的轮子,然后安装轮子:

cdto the directory containing .whlfile:

cd到包含.whl文件的目录:

pip install some-package.whl

回答by Wei

easy_install pip

easy_install pip

I used it, for the problem of pip installation in miniconda. sometimes the pip is not properly installed but it claims yes

我用它,解决miniconda中pip安装的问题。有时 pip 没有正确安装,但它声称是

回答by Karthik Sekaran

Solution:- (Note:- This will surely work for all!!)

解决方案:-(注意:- 这肯定适用于所有人!!)

Step 1:- conda search python

第 1 步:- conda 搜索 python

Step 2:- conda install python=3.5.2

第 2 步:- conda install python=3.5.2

Step 3:- pip install tensorflow

第 3 步:- pip 安装 tensorflow

Step 4:- import tensorflow as tf

第 4 步:- 将 tensorflow 导入为 tf

回答by Zoran M

I have Windows10, 64bit, Anaconda4.3 with Python 3.6.

我有 Windows10、64 位、Anaconda4.3 和 Python 3.6。

Karthik' soluton worked for me. Before that I tried everything including "conda create -n tensorflow python=3.5", but it did not work (although "python --version" gave 3.5.3).

Karthik 的解决方案为我工作。在此之前,我尝试了包括“conda create -n tensorflow python=3.5”在内的所有方法,但没有奏效(尽管“python --version”给出了 3.5.3)。

回答by Justin Zhang

you should be able to install tensorflow using

你应该能够使用安装tensorflow

$ conda install -c conda-forge tensorflow

$ conda install -c conda-forge tensorflow