We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
conda env create giving ImportError for yaml package
`conda env create` suddenly started giving `"ImportError: No module named 'yaml'"` with latest miniconda on my TravisCI builbs: https://travis-ci.org/leouieda/website/builds/170917743

I changed nothing significant in my code. Tried rebuilding previous passing builds and started getting the same error. 

Is this something from a recent release?

conda env create giving ImportError for yaml package
`conda env create` suddenly started giving `"ImportError: No module named 'yaml'"` with latest miniconda on my TravisCI builbs: https://travis-ci.org/leouieda/website/builds/170917743

I changed nothing significant in my code. Tried rebuilding previous passing builds and started getting the same error. 

Is this something from a recent release?


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conda_env/yaml.py`
Content:
```
1 """
2 Wrapper around yaml to ensure that everything is ordered correctly.
3 
4 This is based on the answer at http://stackoverflow.com/a/16782282
5 """
6 from __future__ import absolute_import, print_function
7 from collections import OrderedDict
8 import yaml
9 
10 
11 def represent_ordereddict(dumper, data):
12     value = []
13 
14     for item_key, item_value in data.items():
15         node_key = dumper.represent_data(item_key)
16         node_value = dumper.represent_data(item_value)
17 
18         value.append((node_key, node_value))
19 
20     return yaml.nodes.MappingNode(u'tag:yaml.org,2002:map', value)
21 
22 yaml.add_representer(OrderedDict, represent_ordereddict)
23 
24 dump = yaml.dump
25 load = yaml.load
26 dict = OrderedDict
27
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/conda_env/yaml.py b/conda_env/yaml.py
--- a/conda_env/yaml.py
+++ b/conda_env/yaml.py
@@ -5,7 +5,9 @@
 """
 from __future__ import absolute_import, print_function
 from collections import OrderedDict
-import yaml
+
+from conda.common.yaml import get_yaml
+yaml = get_yaml()
 
 
 def represent_ordereddict(dumper, data):

{"golden_diff": "diff --git a/conda_env/yaml.py b/conda_env/yaml.py\n--- a/conda_env/yaml.py\n+++ b/conda_env/yaml.py\n@@ -5,7 +5,9 @@\n \"\"\"\n from __future__ import absolute_import, print_function\n from collections import OrderedDict\n-import yaml\n+\n+from conda.common.yaml import get_yaml\n+yaml = get_yaml()\n \n \n def represent_ordereddict(dumper, data):\n", "issue": "conda env create giving ImportError for yaml package\n`conda env create` suddenly started giving `\"ImportError: No module named 'yaml'\"` with latest miniconda on my TravisCI builbs: https://travis-ci.org/leouieda/website/builds/170917743\n\nI changed nothing significant in my code. Tried rebuilding previous passing builds and started getting the same error. \n\nIs this something from a recent release?\n\nconda env create giving ImportError for yaml package\n`conda env create` suddenly started giving `\"ImportError: No module named 'yaml'\"` with latest miniconda on my TravisCI builbs: https://travis-ci.org/leouieda/website/builds/170917743\n\nI changed nothing significant in my code. Tried rebuilding previous passing builds and started getting the same error. \n\nIs this something from a recent release?\n\n", "before_files": [{"content": "\"\"\"\nWrapper around yaml to ensure that everything is ordered correctly.\n\nThis is based on the answer at http://stackoverflow.com/a/16782282\n\"\"\"\nfrom __future__ import absolute_import, print_function\nfrom collections import OrderedDict\nimport yaml\n\n\ndef represent_ordereddict(dumper, data):\n    value = []\n\n    for item_key, item_value in data.items():\n        node_key = dumper.represent_data(item_key)\n        node_value = dumper.represent_data(item_value)\n\n        value.append((node_key, node_value))\n\n    return yaml.nodes.MappingNode(u'tag:yaml.org,2002:map', value)\n\nyaml.add_representer(OrderedDict, represent_ordereddict)\n\ndump = yaml.dump\nload = yaml.load\ndict = OrderedDict\n", "path": "conda_env/yaml.py"}], "after_files": [{"content": "\"\"\"\nWrapper around yaml to ensure that everything is ordered correctly.\n\nThis is based on the answer at http://stackoverflow.com/a/16782282\n\"\"\"\nfrom __future__ import absolute_import, print_function\nfrom collections import OrderedDict\n\nfrom conda.common.yaml import get_yaml\nyaml = get_yaml()\n\n\ndef represent_ordereddict(dumper, data):\n    value = []\n\n    for item_key, item_value in data.items():\n        node_key = dumper.represent_data(item_key)\n        node_value = dumper.represent_data(item_value)\n\n        value.append((node_key, node_value))\n\n    return yaml.nodes.MappingNode(u'tag:yaml.org,2002:map', value)\n\nyaml.add_representer(OrderedDict, represent_ordereddict)\n\ndump = yaml.dump\nload = yaml.load\ndict = OrderedDict\n", "path": "conda_env/yaml.py"}]}