I have a Python program that uses YAML. I attempted to install it on a new server using pip install yaml
and it returns the following:
$ sudo pip install yaml Downloading/unpacking yaml Could not find any downloads that satisfy the requirement yaml No distributions at all found for yaml Storing complete log in /home/pa/.pip/pip.log
How do I install the yaml package for Python? I'm running Python 2.7. (OS: Debian Wheezy)
YAML format YAML natively supports three basic data types: scalars (such as strings, integers, and floats), lists, and associative arrays. The official recommended filename extension for YAML files has been . yaml . There are two modules in Python for YAML: PyYAML and ruamel.
You could try the search feature in pip,
$ pip search yaml
which looks for packages in PyPI with yaml in the short description. That reveals various packages, including PyYaml, yamltools, and PySyck, among others (Note that PySyck docs recommend using PyYaml, since syck is out of date). Now you know a specific package name, you can install it:
$ pip install pyyaml
If you want to install python yaml system-wide in linux, you can also use a package manager, like aptitude
or yum
:
$ sudo apt-get install python-yaml $ sudo yum install python-yaml
pip install pyyaml
If you don't have pip, run easy_install pip
to install pip, which is the go-to package installer - Why use pip over easy_install?. If you prefer to stick with easy_install, then easy_install pyyaml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With