Reputation: 3350
Im trying to install pyYAML from source on windows 10. I downloaded PyYAML 3.11 from https://pypi.python.org/pypi/PyYAML. When I run setup.py I get error: [WinError 2] The system cannot find the file specified. How to fix it?
PyYAML-3.11>python setup.py install
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\yaml
copying lib3\yaml\composer.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\constructor.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\cyaml.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\dumper.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\emitter.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\error.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\events.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\loader.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\nodes.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\parser.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\reader.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\representer.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\resolver.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\scanner.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\serializer.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\tokens.py -> build\lib.win-amd64-3.5\yaml
copying lib3\yaml\__init__.py -> build\lib.win-amd64-3.5\yaml
running build_ext
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
checking if libyaml is compilable
error: [WinError 2] The system cannot find the file specified
Upvotes: 8
Views: 33987
Reputation: 7171
I install PyYAML following these steps:
cd
to the downloaded pathpython setup.py install
as README in the repo saysUpvotes: 2
Reputation: 51
Download suitable(Python version, 32/64 bit) .exe file from http://pyyaml.org/wiki/PyYAML, then double click it to install PyYAML to your Windows 10 PC following the wizard window.
Upvotes: 0
Reputation: 4321
Download the wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyyaml that suits your need (Python version, 32/64 bit).
$ pip3 install PyYAML-3.11-cp35-none-win32.whl
Upvotes: 11
Reputation: 174624
You will need to install many dependencies to get a proper build environment setup in Windows.
To make your life easy, there are use the windows installers (the .exe files) that correspond to your version of Python (so if you have installed 32 bit Python on 64bit Windows, use the 32bit installers).
The installers are listed on the PyPi index page for PyYAML.
The only drawback is that these installers will not work correct in a virtual environment, so you'll have to install them against the base version of Python.
Upvotes: 1