How do I install the yaml package for Python?

How do I install the yaml package for Python?

Asked on November 12, 2018 in Python.
Add Comment


  • 3 Answer(s)

      Use the search feature in pip,

    $ pip search yaml
    

      which appearance for packages in PyPI with yaml within the short description. That reveals numerous packages, together with PyYaml, yamltools, and PySyck, among others (Note that PySyck docs advocate exploitation PyYaml, since syck is out of date). currently you recognize a particular package name, you’ll be able to install it:

    $ pip install pyyaml
    

      For Install python yaml system-wide in linux,Using the package manager, like aptitude or yum will give  the desired result:

    $ sudo apt-get install python-yaml
    $ sudo yum install python-yaml
    
    Answered on November 12, 2018.
    Add Comment

      Try this code:

    pip install pyyaml
    

      The alternative solution for not having pip, run  the easy_install pip to install pip, which is the go-to package installer – Why use pip over easy_install?. Those who prefer to stick with easy_install, then easy_install pyyaml .

    Answered on November 12, 2018.
    Add Comment

      For MacOSX (mavericks), The subsequent looks to work:

    brew install libyaml
    sudo python -m easy_install pyyaml
    
    Answered on November 12, 2018.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.