python - 无法在Python中安装Tensorflow

标签 python tensorflow python-3.5

我在 Windows 上运行 python 3.5.3

我尝试使用

pip install --upgrade tensorflow 

这是我得到的结果

Using cached tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
Requirement already up-to-date: wheel>=0.26 in 
c:\users\max\miniconda3\lib\site-packages (from tensorflow)
Exception:
Traceback (most recent call last):
  File "C:\Users\Max\Miniconda3\lib\site-packages\pip\basecommand.py", line 
215, in main
status = self.run(options, args)
  File "C:\Users\Max\Miniconda3\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
  File "C:\Users\Max\Miniconda3\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "C:\Users\Max\Miniconda3\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "C:\Users\Max\Miniconda3\lib\site-packages\pip\req\req_set.py", line 666, in _prepare_file
    check_dist_requires_python(dist)
  File "C:\Users\Max\Miniconda3\lib\site-packages\pip\utils\packaging.py", line 48, in check_dist_requires_python
    feed_parser.feed(metadata)
  File "C:\Users\Max\Miniconda3\lib\email\feedparser.py", line 178, in feed
self._input.push(data)
  File "C:\Users\Max\Miniconda3\lib\email\feedparser.py", line 104, in push
self._partial.write(data)
TypeError: string argument expected, got 'NoneType'

我也尝试过

pip3 install --upgrade tensorflow

但是我回来了

'pip3' is not recognized as an internal or external command, operable program or batch file.

我不太确定错误是什么,并且谷歌搜索没有给我任何结果

最佳答案

我也遇到了同样的问题。我正在使用 Anaconda,并且我设法使用以下命令安装它:

conda create -n tensorflow 
activate tensorflow
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl

这对我有用,也许这也适用于 miniconda。

关于python - 无法在Python中安装Tensorflow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43327981/

相关文章:

python - 处理 pandas 列名称与动态列名称的连接

python - 高效地将值从一列替换为另一列 Pandas DataFrame

python - Keras - 是否可以在 Tensorboard 中查看模型的权重和偏差

c - 在 Windows 上嵌入带有 tkinter 支持的 Python 3.5

python - shapely is_valid 对于 3D 多边形

python - Numpy.where 解决方法

python - Tensorflow:如何在约束下最小化

python - Tensorflow 运行之间的准确性保持相同

python - Nose 测试和类方法

centos7没有安装pip3