How do I install the yaml package for Python?

0 votes

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?

May 11 in Python by kartik
• 27,140 points
967 views

1 answer to this question.

0 votes

Hello @kartik,

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 . 

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

Thank You!!

answered May 11 by Niroj
• 58,500 points

Related Questions In Python

0 votes
0 answers

how do i install django in my system for the project?

can you tell me the procedure for ...READ MORE

May 3, 2019 in Python by Waseem
• 4,540 points
54 views
0 votes
1 answer

In NumPy how do I get the maximum of subsets? Python

You can use np.maximum.reduceat: >>> _, idx = np.unique(g, ...READ MORE

answered Nov 9, 2018 in Python by Nymeria
• 3,520 points
271 views
+1 vote
1 answer
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,355 views
0 votes
0 answers
0 votes
1 answer

How do I merge two dictionaries in a single expression in Python?

Hello, For dictionaries x and y, z becomes a shallowly merged dictionary with ...READ MORE

answered Apr 13 in Python by Niroj
• 58,500 points
76 views
0 votes
1 answer

How do I sort a list of dictionaries by a value of the dictionary?

Hello @kartik, import operator To sort the list of ...READ MORE

answered Apr 23 in Python by Niroj
• 58,500 points
67 views