【发布时间】:2018-04-29 22:11:41
【问题描述】:
我正在尝试在 Windows 10 上安装 Keras。我按此特定顺序安装了 Visual Studio 2015 Community Edition、CUDA 8.0、它的第二个补丁、cuDNN 6.0、PyCharm、Anaconda、Python 3.6.3。
我安装了tensorflow-gpu。
我将\path-to\Python\Python36\bin 添加到PATH 环境变量和NVIDIA 文件夹中。 Tensorflow 在 shell 中工作,但不是在 Anaconda 提示符下工作。
当我尝试使用 PowerShell 中的pip install keras 安装 Keras 时,出现以下错误。
PS C:\Users\myusr> pip install keras
Collecting keras
Downloading Keras-2.1.1-py2.py3-none-any.whl (302kB)
100% |████████████████████████████████| 307kB 553kB/s
Collecting pyyaml (from keras)
Downloading PyYAML-3.12.tar.gz (253kB)
100% |████████████████████████████████| 256kB 553kB/s
Collecting scipy>=0.14 (from keras)
Downloading scipy-1.0.0-cp36-none-win_amd64.whl (30.8MB)
100% |████████████████████████████████| 30.8MB 41kB/s
Requirement already satisfied: six>=1.9.0 in c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages (from keras)
Requirement already satisfied: numpy>=1.9.1 in c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages (from keras)
Building wheels for collected packages: pyyaml
Running setup.py bdist_wheel for pyyaml ... error
Failed building wheel for pyyaml
Running setup.py clean for pyyaml
Failed to build pyyaml
Installing collected packages: pyyaml, scipy, keras
Running setup.py install for pyyaml ... error
Exception:
Traceback (most recent call last):
File "c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8a in position 76: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\myusr\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8a in position 76: invalid start byte
我能做什么?
【问题讨论】:
-
尝试单独安装pyyaml,看看会不会报同样的错误。 $ pip install pyyaml
-
同时尝试更新您的 setuptools:$ pip install --upgrade setuptools --ignore-installed
-
谢谢。错误输出还是一样,还是不行!
-
您的操作系统使用什么语言?
标签: python windows tensorflow keras