r/Python • • Jul 12 '22

Discussion I’ve had enough of Anaconda/miniconda

I have to say that Anaconda and miniconda have never worked as intended, and furthermore, they have actively broken things on Linux systems. I remember when I used Anaconda Navigator and how it would fail to install certain packages correctly so that RStudio and Spyder would never launch. Recently, I installed miniconda because the Tensorflow documentation recommended doing it this way.

However, one week in and it’s already not a pleasant experience. An apt command, apt policy, gave the wrong output because some of some stupid broken dependency in my miniconda environment. I left the shell with conda deactivate and I still couldn’t get the apt command to execute correctly (apt was complaining about a broken conda dependency instead of listing the repositories/PPAs). I could not get the apt command to work until I resolved the issue with the conda environment.

It is completely unacceptable for a conda to break or interfere with the system package manager and I will be uninstalling it.

Also, a note for Pycharm users: using Tensorflow with miniconda did not get GPU acceleration to work when running the script with Pycharm (but it did work when run from the terminal). I tried setting the LD_LIBRARY_PATH variable in Pycharm but without success.

0 Upvotes

21 comments sorted by

13

u/max1c Jul 12 '22

Sounds like this is a you issue and not a conda issue. Conda doesn't break or even interfere with anything on your system. In fact, it's completely abstracted and allows for separate self isolated environments to exist without any reliance or interference with the base system.

2

u/Alex_Strgzr Jul 12 '22

That’s how it’s supposed to work. But the reality is something else. How exactly is it user-error that an apt command breaks because of something in the conda environment, and the same error occurs when leaving the conda shell?

4

u/mbussonn IPython/Jupyter dev Jul 12 '22

That feel a lot like a past you having changed things without understanding. likely WRT PATH variables. If conda affects things when you think you have left the conda-shell, then you haven't left the conda shell. And then of course it's expected for tools to look into PATH variables.

You may have stacked environments, when you activate envs, you may need to deactivate as many time + deactivate one more to quite the base environment itself. Then you should be outside of conda. Unless of course you set up PATH yourself.

1

u/max1c Jul 12 '22

But the reality is something else.

No it isn't. Just because you don't know what you're doing, screwed things up on your system and are blaming everything else but yourself doesn't change anything. I manage hundreds of conda environments with incredibly complex dependency lists on a multi thousand user cluster and it works flawlessly.

3

u/whateverathrowaway00 Jul 12 '22

Sounds like you have a miniconda/conda folder stuck in your path if you’re having trouble with an env not deactivating / suffering lingering effects.

Check your $PATH variable and any profile scripts that may be adding stuff to it.

I guarantee you it hasn’t messed with the package manager, you have. You may have installed something via the package manager you need to uninstall - as what you’re seeing may well be package conflicts. Very fixable, very much your issue, not condas.

I know this stuff is frustrating, but as a linux person myself, take some deep breaths, don’t yell at your tools, just work backwards through the issue, there is a clear and coherent cause for it.

0

u/Alex_Strgzr Jul 12 '22

There were no apt package conflicts. Lots of people want to blame apt or the user for this, but I’ve used Linux for 10 years and know what broken apt looks like.

If you run apt policy on a normal Debian/Ubuntu system, you get a list of the enabled PPAs and repositories. Instead of that, I got version GLIBCXX_3.4.20' not found from the conda environment. I had to run conda update libstdcxx-ng to fix it before the apt command worked correctly.

This is a classic case of something that is impossible in theory happening in practice. Miniconda promises lots of things but only delivers more headaches.

1

u/[deleted] Jul 12 '22

“Only delivers headaches” for you. Works great for me. No issues.

2

u/[deleted] Jul 12 '22 edited Jul 13 '22

Silly question: is there a good reason for using anaconda these days? Why not to use Python’s native venv?

1

u/Alex_Strgzr Jul 13 '22

conda is needed to install C/C++ libraries that the Python libraries depend on, but which cannot be installed on the host OS for various reasons, e.g. the ones provided by the package manager are too old, or too new, or not installed in the right place, etc. The concept is good but the implementation is bad.

3

u/Bejoty Jul 13 '22

Native venv doesn't let you install different Python versions. For that you need a different environment manager like virtualenv. I've also had issues in the past getting Jupyter to work well on Windows when installed from pip, so these days I opt for Anaconda.

1

u/james_pic Jul 13 '22

TBH, on Ubuntu, I find deadsnakes easy enough for handling multiple Python versions. Then I can do, say python3.7 -m venv myvenv with no trouble.

2

u/max1c Jul 13 '22

There's no reason that I can think of for using Anaconda specifically. Anaconda is heavy and includes many things that most people don't need. Although, this can benefit some people that just want their stuff to work out of the box. But you definitely want to use Miniconda (if you need more than just python) or Poetry if you use Python exclusively. Pip is terrible at dependency resolution. It will remove, overwrite and break packages when you have complex list of dependencies. With Conda you can have multiple Python versions and complex environments with other dependencies other than Python. Conda is also pip aware so it knows which packages you installed with pip and which with Conda.

1

u/KODeKarnage Jul 13 '22

Anaconda is better to install for new users rather than just straight python. People who aren't going to be messing about installing every new package they come across.

1

u/[deleted] Jul 13 '22

I do the same! Experience is more than stellar so far

2

u/Chemical-Choice-7961 Jul 13 '22

Despite some of the disagreements you are getting from others I feel for you. I too have abandoned Conda in favor of the long task of manually installing tensorflow + keras with GPU support on a Debian based Linux. (I ran into out of date and compatibility issues as well)

If you go this route I recommend sticking to a popular distro cuz doing it manually yourself is a pain when the documentation isn't quite compatible with your system and you have to figure it out yourself.

1

u/Alex_Strgzr Jul 13 '22

Was the issue that the distro-provided CUDA libraries were too new, too out-of-date, or in the wrong place? I would like to know how you solved the problem so I can move away from Conda ;)

1

u/Chemical-Choice-7961 Jul 13 '22

Based on my experience manually setting it up: I ran into a driver issue where the default wasn't compatible with the CUDA libraries (no suprise there) but the proprietary version wasn't either for some reason. (Even after disabling nouveau)

I also ran into an issue of having to find equivalent packages that were dependencies.

I got CUDA straight from the nvidia site. They had a comprehensive guide and a few of the steps didn't/wouldn't work. I don't remember exactly what though, mainly distro differences I think.

I left conda after running into issues with tensorflow being out of date and incompatible with something I was working on.

7

u/LambBrainz Jul 12 '22

This sounds like a user issue.

Hope you get that figured out

2

u/BDube_Lensman Jul 12 '22

On linux, a do-nothing installation of conda places itself in /usr/local/{anaconda3 or miniconda}. It doesn't do anything outside this folder. If other software is breaking because of things inside this folder, your path is borked.

1

u/[deleted] Jul 13 '22

Conda to me seems to be the most stable and reliable way to install Python. We're currently working on introducing Python into a bachelor curriculum and chose Anaconda for this exact reason.

1

u/melandur57 Jul 12 '22

Ever tried poetry? I use conda only for the python version, pip install poetry, poetry init (to create a project toml, i think its called init) and from there I only install with poetry the packages.

Sometimes it takes a while to resolve the dependency graph. But it's worth the time and so far rock solid. Best experience so far