News for hackers. Stuff that matters.
Re:Escaping from Anaconda's Stranglehold on macOS by brewmarche on Sunday September 01, 2024 @02:06PM (#41418901)
You can just keep Anaconda and just use it as a pyenv replacement, e.g.:

  conda create -n "myenv" python=3.8
  conda activate myenv
Then just use pip in your environment, if you don’t like conda packages. Not sure what the paragraph about being able to install multiple Python versions after getting rid of Anaconda is about.
Re:Escaping from Anaconda's Stranglehold on macOS by ok123456 on Sunday September 01, 2024 @03:19PM (#41419526)
I had to do this, using Anaconda as a pyenv replacement, because I worked with people with many levels of IT bureaucracy. They couldn't just go to python.org, download an official release, and use it within their user profile. They were only allowed to use Anaconda because it was on a list of approved software.
Re:Escaping from Anaconda's Stranglehold on macOS by brewmarche on Sunday September 01, 2024 @04:01PM (#41419871)
Same here. It’s not that bad of a solution when you think about it.
Re:Escaping from Anaconda's Stranglehold on macOS by rubslopes on Sunday September 01, 2024 @04:35PM (#41420146)
Anaconda (and miniconda) is a very good solution if you need a container-like environment. I can easily go back to old projects with different python versions and do maintenance in them with no hassle.
Re:Escaping from Anaconda's Stranglehold on macOS by ok123456 on Sunday September 01, 2024 @04:39PM (#41420196)
pyproject.toml is a better solution
Re:Escaping from Anaconda's Stranglehold on macOS by okanat on Sunday September 01, 2024 @05:14PM (#41420445)
Does it handle binary dependencies and Python ABI changes well? Does it isolate them from almost the entire operating system? Conda does those.

Conda packages compiled such that the search paths of the binaries are not using the OS's (which why the Linux DE Qt theme doesn't work for Spyder).

Conda also comes with well optimized binaries for high performance compute which is absolutely a must for modern data science.

Re:Escaping from Anaconda's Stranglehold on macOS by ok123456 on Sunday September 01, 2024 @09:08PM (#41421673)
Use docker/podman if you are worried about ABI changes and isolating them from the entire operating system.

Most people's problems getting their Python toolchains to work optimally are caused by using operating systems that don't come with build utils. That's a cultural problem solved by using an operating system with a culture of distributing those tools.

Re:Escaping from Anaconda's Stranglehold on macOS by exe34 on Monday September 02, 2024 @05:04AM (#41423802)
Or use conda.
Re:Escaping from Anaconda's Stranglehold on macOS by ok123456 on Monday September 02, 2024 @01:09PM (#41427084)
Or use debian
Re:Escaping from Anaconda's Stranglehold on macOS by exe34 on Monday September 02, 2024 @01:48PM (#41427397)
yes, because installing random python libraries to system python on Debian never broke any system.
Re:Escaping from Anaconda's Stranglehold on macOS by ok123456 on Monday September 02, 2024 @02:39PM (#41427791)
Use poetry/Debian. Standard Python tooling is acceptable in 2024; using some busted 3-plus-year-old "supported" environment with a package manager with a really busted constraint solver, which doesn't even come bundled with compilers, is unnecessary.
Re:Escaping from Anaconda's Stranglehold on macOS by exe34 on Monday September 02, 2024 @05:41PM (#41429026)
I've installed plenty of compilers using conda - how long ago was it that you last tried it? even ROS is available in conda now, instead of requiring specific obsolete versions of Ubuntu.
Re:Escaping from Anaconda's Stranglehold on macOS by viraptor on Sunday September 01, 2024 @03:28PM (#41419616)
That's installing another 3.8 rather than using the system one, isn't it?
Re:Escaping from Anaconda's Stranglehold on macOS by brewmarche on Sunday September 01, 2024 @03:59PM (#41419858)
Yes, you can specify any Python version available in the official channel: https://anaconda.org/main/python/files

If you have license issues with the official Anaconda repos (talked about in other comments), switch to the conda-forge channel instead, it doesn’t have these restrictions: https://anaconda.org/conda-forge/python/files

Re:Escaping from Anaconda's Stranglehold on macOS by tkuraku on Sunday September 01, 2024 @05:50PM (#41420689)
This would be the sane advice.
Re:Escaping from Anaconda's Stranglehold on macOS by cowsandmilk on Sunday September 01, 2024 @06:04PM (#41420795)
No, because half the students in your 200 person class don’t have anaconda installed and now you are managing students in yet another state of python environment management with TAs who are economics grad students, not python experts
Re:Escaping from Anaconda's Stranglehold on macOS by promer on Tuesday September 03, 2024 @12:30AM (#41431277)
> Not sure what the paragraph about being able to install multiple Python versions after getting rid of Anaconda is about.

The sentence says "install and run". The problem is with "run."

On macOS, most students who install Anaconda accept the default, which is to autoactivate the base conda environment every time someone starts a terminal session. As a result, the instructions for starting an official Python don't work.

If you use Anaconda on Windows, you will not be able to test the effects of autoactivate.

Re:Escaping from Anaconda's Stranglehold on macOS by brewmarche on Tuesday September 03, 2024 @05:04PM (#41439192)
I did not know that (only know it from Windows), thanks for the explanation.

It looks like

  conda config --set auto_activate_base false
would be another fix for that. Or adjusting .condarc manually if you insist on not using the CLI. However I think teaching students about (virtual) environments will require them to know at least some CLI basics anyway.
Re:Escaping from Anaconda's Stranglehold on macOS by promer on Tuesday September 03, 2024 @11:40PM (#41441688)
Yes, this would be another way to escape from the conda base environment.

And as I've indicated in other responses, I absolutely agree that students need to learn how to edit files and run commands from the terminal. The only question concerns the order in which to teach these basics.

But please understand the facts. The majority of students I've encounter who have Anaconda installed on a Mac, had totally given up on the possibility of running an official version of Python. This, by the way, is a big indictment of the Anaconda Navigator, which encourages students to keep using a GUI instead of mastering files and shell commands.

Part of why I recommend the basics:

- an official python - pip and pypi.org - venv from the standard library

is that it gets them out of this pattern of this dependency on a GUI. This, by the way, also gives me some hesitation about VS Code. It too reinforces the GUI as the way to set up a working environment.