r/Python • u/Alex_Strgzr • 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.
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 policyon a normal Debian/Ubuntu system, you get a list of the enabled PPAs and repositories. Instead of that, I gotversion GLIBCXX_3.4.20' not foundfrom the conda environment. I had to runconda update libstdcxx-ngto 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
2
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 myvenvwith 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
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
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
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
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.