Anaconda, Tensorflow and Environments

Hello. I have been using Anaconda for a while, and never had problems regarding packages. I mostly used NumPy, Pandas and Matplotlib. And all of them I installed in base(root) environment.

Now, when trying to install Keras and Tensorflow, I could not install it in that environment (the loading was taking forever).

I googled it, and everyone was making new environment and then installing it. What are environments excatly? Do we need them just in order to separate packages depending on our project, so we do not install all the packages in the one environment if we do not need them?

Second thing, I am doing no projects, and I do not need new environment. I would like to have all of my packages in base environment. Why it is not possible to install tensorflow in base environment? I must create new environment and there install tensorflow. Why it works in newly created environment but not in base environment?

Thanks!

Hello @farees,

I don’t use Anaconda, but can you share screenshots of Tensorflow’s installations? You said it took forever, but I am wondering whether there was any hint from messages of the installation process.

Raymond

PS: Just to confirm, you have successfully installed a Tensorflow in a new environment, right?

You should also confirm that the version of Python in your environment(s) is appropriate for the version of Keras and TensorFlow you are installing. I don’t like to mess with environments that are coherent and for which I have developed programs that work. When I take a new specialization on Coursera that requires different packages than I have installed previously, AI for Medicine and NLP come to mind, I prefer to create a new, dedicated, virtual env. I find it easier to manage the dependencies. I also use conda and not Anaconda, since, at least when I assessed it a couple years ago, Anaconda by default installed way more than I wanted or needed. Conda did what I told it to and very little more.

It just stays like this forever. And yes, it works in a new environment. I have python 3.10.0 (installed manually) and 3.9.7 (installed with anaconda). Both of them I added to the Path in environment variables

image

I have python 3.10.0 (installed manually) and 3.9.7 (installed with anaconda). Both of them I added to the Path in environment variables. Can you explain how are you using conda package manager without installing Anaconda?

I am not familiar with this graphical user interface. how did you start the installation process?

Just installed it via GUI. Selected TF and Keras and install

Thanks for sharing it, but there is not much information we can work on. You might want to google for others’ experience or perhaps try to install it in a Command Line Interface (CLI) which hopefully will give you more messages.

For example, I googled “anaconda freeze solving package specifications” and found this. This action looks safe but I am not sure if it is going to help.

Can you suggest me some good book that explains all the concepts about installing python, adding to a path, pip, conda, anaconda, separate environments, multiple python versions, etc all things related to managing this stuff?

Sorry, I don’t know any book about that, and I don’t use Anaconda. Try googling it, and I believe you have probably read more than I do about Anaconda.

From their own doc… The fastest way to obtain conda is to install Miniconda, a mini version of Anaconda that includes only conda and its dependencies. If you prefer to have conda plus over 7,500 open-source packages, install Anaconda.

Also, note that while the absolute version is important, it is also vital that the versions of Python and its packages, Keras, and TensorFlow (and anything else you use like R) are at compatible versions.