4 ms·
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
by brewmarche 2y ago
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.
- ok123456 2y agoI 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.
- brewmarche 2y agoSame here. It’s not that bad of a solution when you think about it.
- rubslopes 2y agoAnaconda (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.
- ok123456 2y agopyproject.toml is a better solution
- okanat 2y agoDoes 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.
- ok123456 2y agoUse 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.
- exe34 2y agoOr use conda.
- ok123456 2y agoOr use debian
- exe34 2y agoyes, because installing random python libraries to system python on Debian never broke any system.
- ok123456 2y agoUse 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.
- exe34 2y agoI'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.
- viraptor 2y agoThat's installing another 3.8 rather than using the system one, isn't it?
- brewmarche 2y agoYes, you can specify any Python version available in the official channel: https://anaconda.org/main/python/files 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 https://anaconda.org/conda-forge/python/files
- tkuraku 2y agoThis would be the sane advice.
- cowsandmilk 2y agoNo, 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
- promer 2y ago> 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.
- brewmarche 2y agoI 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.
- promer 2y agoYes, 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.