Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install pyYAML on windows 10

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
like image 236
Kamrul Khan Avatar asked Nov 12 '15 05:11

Kamrul Khan


People also ask

How do I download PyYAML?

Download and Installationhttp://pyyaml.org/download/pyyaml/PyYAML-5.3.1-cp27-cp27m-win32.whl (for Python 2.7) http://pyyaml.org/download/pyyaml/PyYAML-5.3.1-cp35-cp35m-win32.whl (for Python 3.5) http://pyyaml.org/download/pyyaml/PyYAML-5.3.1-cp36-cp36m-win32.whl (for Python 3.6)

How do I know if PyYAML is installed?

To check which version of pyyaml is installed, use pip show pyyaml or pip3 show pyyaml in your CMD/Powershell (Windows), or terminal (macOS/Linux/Ubuntu) to obtain the output major.

How do I install pip on Windows 10?

Step 1: Download the get-pip.py (https://bootstrap.pypa.io/get-pip.py) file and store it in the same directory as python is installed. Step 2: Change the current path of the directory in the command line to the path of the directory where the above file exists. Step 4: Now wait through the installation process. Voila!

What is PyYAML in Python?

PyYAML is a YAML parser and emitter for Python. PyYAML features a complete YAML 1.1 parser, Unicode support, pickle support, capable extension API, and sensible error messages. PyYAML supports standard YAML tags and provides Python-specific tags that allow to represent an arbitrary Python object.


1 Answers

  1. Download the wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyyaml that suits your need (Python version, 32/64 bit).

  2. $ pip3 install PyYAML-3.11-cp35-none-win32.whl

like image 188
Benoit Avatar answered Sep 27 '22 18:09

Benoit