Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why isn't yaml package getting installed in conda env? [duplicate]

Tags:

python

yaml

conda

I'm not able to get yaml 0.2.5 installed into a virtual environment using conda. I've first created a very basic yml file with just python 3.8.5 and yaml 0.2.5 listed as the dependencies: [![foo.yml][1]][1]

And then I create a virtual environment based on that yaml file: [![foo env][2]][2]

When I activate and then list the contents of that environment, yaml 0.2.5 is listed: [![foo env list][3]][3]

But then when I start up a python REPL and try to import the yaml package, it says that the package doesn't exist: [![python][4]][4]

And if I go to Anaconda3/envs/foo/Lib/site-packages, yaml is NOT listed: [![foo/Lib/site-packages listing][5]][5]

I'm thoroughly perplexed about why yaml won't get installed in this virtual environment. (I've tried this with other packages, and haven't run into similar issues. It appears to only be happening with the yaml package.)

Any help figuring out what's going on, would be greatly appreciated. Thanks. [1]: https://i.sstatic.net/OgFut.png [2]: https://i.sstatic.net/ZZFNK.png [3]: https://i.sstatic.net/mMVtz.png [4]: https://i.sstatic.net/kx4fJ.png [5]: https://i.sstatic.net/fjbT3.png

like image 702
kxp Avatar asked Oct 11 '25 10:10

kxp


1 Answers

As @Tzane already mentioned yaml is called pyyaml.

use,

conda install -c anaconda pyyaml

To download pyyaml.

Links to official conda and PyPi mentions of yaml.

like image 77
Deera Wijesundara Avatar answered Oct 13 '25 23:10

Deera Wijesundara