python – Understanding creating virtual environments and how to use them

I am having issues telling the difference between conda prompt and anaconda navigator, especially when it comes to creating new environments and understanding how to install packages properly.

I created a new virtual environment with the packages that I needed using anaconda navigator, however I realized that for each new environment I would have to install spyder, but I don’t want to do that. I want to be able to have one instance of spyder installed on my computer and be able to run any virtual environment I would like. I tried to do it with conda prompt and using install spyder-kernels and activating the virtual environment but I ran into an issue when I tried running the code, I ran into a ModuleNotFound error for pandas even though I already installed it using conda and changed the interpreter to the python file in said environment. I think what fixed it was typing in the spyder console “conda install -c pandas”…which begs the question what was the point of creating the new environment and installing the packages through conda if I still have to install it through the spyder console

Read more here: Source link