conda list pyyaml
# packages in environment at c:\Anaconda3:
#
# Name Version Build Channel
pyyaml 3.13 py36hfa6e2cd_1001 conda-forge
conda env list
# conda environments:
#
C:\Anaconda3
base c:\Anaconda3
yaml * c:\Anaconda3\envs\yaml
Switching to yaml environment
activiate yaml
conda list pyyaml
# packages in environment at c:\Anaconda3\envs\yaml:
#
# Name Version Build Channel
pyyaml 5.2 py36he774522_0
Starting Python within environment yaml with python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.__version__
'3.13'
Why is 3.13 and not 5.2 returned?
Update 2019-12-17, 14:32
(base) D:\a\buch>
(base) D:\a\buch>conda activate yaml
(yaml) D:\a\buch>
(yaml) D:\a\buch>python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.__version__
'3.13'
>>>
(yaml) D:\a\buch>c:\Anaconda3\envs\yaml\python.exe
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.__version__
'3.13'
>>>