I'm having trouble installing Keras on windows 10 with python 3.6.3. When I execute
pip3 install keras
I get a failure on install of the package PyYAML :
Installing collected packages: pyyaml, keras
...
checking if libyaml is compilable
error: [WinError 3] The system cannot find the path specified: 'D:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
----------------------------------------
Failed building wheel for pyyaml
There seems to be a missing dependency to Visual Studio ? Anyone come across this before ?
The latest PyYAML (3.12) was released before the availability of Python 3.6.0. Because of its low-maintenance-mode the last couple of years, there are no wheels available for that Python version.
So you are installing from the source (.zip) file and pip
first tries to make wheel for its cache, thereby needing the Visual Studio compiler for the CLoader/CDumper.
Last time I looked at it (some years ago) the setup.py
, in PyYAML, checked if compilation was possible and if not, proceeded installing without C extensions. Either a change in the setup.py
, or in pip
causes this to be tried anyway, leading to this error. The resulting wheel would be stored in pip
's cache.
Apart from switching to Python 3.5, or installing Visual Studio (cumbersome), you can try to use:
pip3 install --no-binary pyyaml --no-cache-dir keras