Escaping from Anaconda's Stranglehold on macOS
paulromer.net
paulromer.net
> You will not be forced to work inside something known as a “virtual environment.”
Oof, this terrible advice cancels out an otherwise reasonable post. Beginners who don't know what they're doing are the last people who should be `pip install -r requirements.txt`-ing into the system Python the way this article is recommending. That's not only going to make working on multiple projects nearly impossible (especially for the kind of beginning students who get recommended Anaconda, which are almost always the Data Science-y crowd using NumPy, Pandas, Scikit, etc, which are notoriously finicky with version conflicts), but it stands a good chance of breaking other Python-based system utilities in completely opaque ways. This sort of advice can fubar a naive user's entire workflow.
I know virtualenvs suck to explain to people, but in my opinion it needs to be done before you ever tell them about `pip install`.
The python packaging system has to be used in case studies of worst design decisions of all time.
Sounds like a skill issue that shouldn’t be seen in “10k+/seat/year software.” I wonder what other fails are in it.
The Python community needs to solve this ASAP. This almost weekly pain point has turned a language I used to love in college into one of my most despised languages. The fact that the ML community uses this broken platform is infuriating.
Make a Python version 4 that focuses only on fixing the packaging. 100% per-project hermeticy. No global packages whatsoever. Solve just this issue and bring the entire ecosystem on board. Kill all the various virtualenvs, the anacondas, global packages. All of it.
Learn from Rust/Cargo. That project does it mostly right (sans lack of namespaces and reproducible builds).
I have resigned myself to repeatedly smashing my keyboard on the desk until it rains keys in blind rage induced frustration to let off steam and then calmly creating an issue in the appropriate repo instead of allowing even a modicum of hope that this will ever be fixed systemically.
That's not hard. Java's package management is well thought out and sane.
The bar is so low, you have to excavate it from a landfill of rotten node_modules...
The issue was, as you say, the introduction of ESM. It used to be that you required modules one way and one way only (yes there was AMD for advanced use cases, but it was an add-on), then people felt the need to “standardize” that, no we have this mess of ESM and CJS.
The alternative to micropackages has significant downsides. Pulling in extra surface and rolling your own buggy implementations while waiting for some commitee to bikeshed years on the implementation.
Making the right thing easy rather than the wrong thing hard is a lot better approach.
The advantage is that it's less "magic" than, say, npm. No need for rules saying how to find node_modules, you just have a PYTHONPATH env variable.
The Rust and Java approach is to do everything through a build tool's CLI, and I can't complain about that. It's probably the best compromise: Less magic than npm, and more user-friendly than Python.
There's also usually one global package dir, but that's almost exclusively used for runnable binaries, and not even really needed when there's npx.
If you think Python packaging has less magic, you probably don't know it very deeply.
I lost all hope for Python package management to ever get better when PEP 582 got rejected for some stupid tribal reasons.
Actually building Python packages is pretty complex, but that's the case for JS too. Java avoids this by distributing compiled libraries.
Traversing to the parent is especially nice for scripts. In python having scripts outside the module directory is quite painful.
Gyp is a lot easier than Python setup.py. The "easy" Java packages are comparable to pure Python/pure JS packages. With e.g. C bindings JNI/Java packaging is a horrid pain.
While not familiar with macOS (topic of this article), I think the Mac installer works the same.
On Debian of course you can cause great damage because the system Python is used for critical system functions. This is silly, I think the system python should be an isolated install in /usr/sbin. Better yet, move back to Perl for the system.
I do use one piece of commercial software that includes Python. You can see the installer saying "installing Python." I suppose it should fall on the OS and software vendors to not abuse the infrastructure... "to whom much is given, much is expected," but maybe too much to expect.
After that you might understand the OP's viewpoint.
I think it is interesting to consider why Python is so popular despite such fiascos. The answers can be very informative but can also be giant red flags.
C/C++? Full of footguns. Java/C#? Too complicated for beginners. Pascal? Outdated. Etc.
I personally prefer C to teach first-year CS students but just as the lesser evil. A good first programming language is sorely lacking.
(Note that I'm talking about the imperative programming paradigm. The debate on whether one should start with functional programming is outside the scope of this comment).
Java's tooling is nice, but frankly Turbo Pascal (or something at its level) is enough for beginners.
C is indeed pretty evil, though slightly less though with modern sanitisers, so you can get a better error message than just a segfault (or silently doing the wrong thing).
Pascal isn't really more outdated than C. Especially if you use Delphi?
Python is actually fine, you can get pretty far with just the standard library, and the libraries that you can install with your Linux distribution's package manager (eg via Pacman). I do agree that package management with Python is pretty bad out-of-the-box.
The answer is really quite simple: F#
If they can’t manage that they have no business doing data science or something similar to begin with
var start = "commtext c00\">";
var end = "</div>";
using var http = new HttpClient();
var page = await http.GetStringAsync("https://news.ycombinator.com/item?id=41425416");
var commStart = page.IndexOf(start) + start.Length;
var commEnd = page.IndexOf(end, commStart);
Console.WriteLine(page[commStart..commEnd]);
or var host = WebApplication
.CreateBuilder()
.Build();
host.MapGet("/", () => "Hello World");
host.Run("http://+:8080");I can teach them a console app with top level statements and have it running before they have installed a Python virtual environment.
I like the recent addition of (proper) pattern matching to Python.
I could see giving them a remote access to a prebuilt env (which can be containerized) to be simpler to explain.
You don't see people complaining that musical instruments are unreasonably complex when that complexity usually gets solved after a couple months of training, or when someone who wants to basic woodworking has to have at least a passing knowledge of the different types of hardwoods, MDFs, and essential joinery techniques.
Hate to say, but it definitely sounds like skills issues.
Simple things like having a student access another student's web server becomes overly complicated, as you're dealing with 4 systems talking to/through each other.
Sure making them understand everything is a journey, but just spawning the server is fairly quick and painless.
What made Virtual environments work for me was switching to a different Editor. I use Visual Studio Code currently it works well with Virtual Environments.
When you first create a new python file in a given "project folder" it prompts you to create a new Venv and when you switch project folders it remembers and restores the Venv for each project.
One of my work colleagues pointed me to VSCode - it streamlined a lot of python things for me.
If your students are disciplined about creating a new folder for each project managing virtual environments vscode could help them.
Only issue I have is my work office has a corporate proxy setup and pip needs certificate to connect (and if I work remotely I have to turn this setting off) I wrote a shell script to toggle between the two proxy settings. Not sure if university will have the same issue proxy issues but if so this would certainly be a pain point for many students.
It does answer the question of which text editor to use when the time comes to teach them about editing text files. For a course, it helps that it is free and available on both macOS and Windows.
I have a vague recollection that at some point I was testing without an install of Python and after I selected the Python extension for VS Code, it offered to install one for me. (I don't recall if this was on macOS or Windows and memory could be playing a trick on me.) But in any case, the people behind VS Code do seem to be trying very hard to make it easy for someone who is getting started.
I am a little uneasy about the nudges to use Copilot, but on balance, it might offer a better path for students who are getting started.
can you? Because I can't.
e.g. "What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?" ( https://stackoverflow.com/questions/41573587/what-is-the-dif... )
what is the difference between conda and anaconda?
etc etc
The projects I work with have moved to it because it handles multiple languages (not just Python). It's made things easy to keep "the correct version of a language" that each project needs.
So far so good, anyway. :)
Then I can pip install away care-free, and quickly run scripts / repls without having to activate an environment.
This is because Python doesn't have versioned imports, which means you can't have multiple versions of the same package in the same environment, but I like to dream about a world where this isn't the case. If instead of import foo we had import foo@x.y.z#optional-checksum, the Python world would be massively improved. It seems like it would be such a simple change too.
Rust has versioned imports. So you can import different versions of the same module (at least in your transitive dependencies).
Rust offers mitigations or means of detection for those cases, but they still require thought and troubleshooting when they occur. Given Python’s lack of static typing and more-likely-to-be-nonexpert user base and usage patterns, I suspect that troublesomeness would not be a value-add for the Python platform.
The entire problem of python an venv IMO comes from it not being the default.
https://packaging.python.org/en/latest/specifications/extern...
IMO the idea that a 'Linux admin' is better informed than a 'Linux user' is increasingly anachronistic. In most cases the admin is just the user running sudo. I'd suggest that such functionality should be enabled by installing some kind of OS package rather than being the default
[global]
break-system-packages = true
I would have preferred single-version-externally-managed to keep fond memories of setuptools alive.It becomes increasingly impossible to track down home directory pollution and config files in Python. Next step will be a Python registry on Linux. How about:
regedit VENV=/home/sjw/venv42 KEYWORD=single-version-externally-managed DWORD=0xbadbeeFor workstations, absolutely, go with virtual environments, it's the only way to go. One concern I've seen from some in the machine learning space is that rebuilding a virtual environment, for example if macOS upgrades the Python version, takes hours. That can be solved by using pyenv, then you can have multiple versions of Python and be free of Anaconda. I primarily use pyenv to be sure that I have the same Python version that ships with the server OS on my laptop.
If you are looking into a system you are unfamiliar with, where do you look first?... pip? pipx? homebrew?... or is it in anaconda? pyenv?... must be in the os package manager... apt? pacman?
Honestly, Maven and NPM look great compared to this mess.
Python isn't as bad as people make it out to be. There are some issue that you will run into if your project/code base becomes really large, but that's not an issue for most people. The vast majority can get just use python -mvenv .venv to set up a virtual environment and install in that using pip.
Next step up is you need specific versions of Python, so you switch to pyenv, which functions mostly like the built in virtualenv.
Then you have the special cases where you need to lock dependencies much hard than pip can do and you use poetry, pip is to slow so you use pipx. Those are edge cases to be honest. That's not to say that they aren't solving very real problem, but mostly you don't need it.
It would be great if there was one tools that could do it all, lock the Python version, do quick dependency resolution and lock them down.
So far Python has opted to split the problem: Tools for locking the Python version, tools for creating separate environments and tools for managing packages. There's a lot of crossover in the first two, but you can pretty much mix and match virtual environment tools and package managers anyway you like. I think that's pretty unique.
I actually recently had to fix something small in a Python project, pip refused to work because of homebrew, homebrew didn't have the dependencies and directed me to pipx, pipx finally worked - It was a strange experience.
And for the record NPM mostly has a bad reputation because of its past... nowadays it's perfectly usable and can lock dependencies and node version "out of the box".
The tooling that ships with Python could be much better, I'd agree with that. You can go pretty far with venv and pip, but just the python3 -mvenv .venv isn't exactly a great example of user friendliness at work.
(P)NPM and CJS is the best package/dependency management there currently is.
export PIP_REQUIRE_VIRTUALENV=trueOn macOS, there hasn't been a system Python since 12.3 came out in Jan of 2022. And as far as I know, there was never a system Python on Windows.
It may not be pre-installed, but if you install Xcode it will also install python3 in /usr/bin/ for you...
Xcode does put a binary with the name python3 into `/usr/bin`. This is not a system Python, but set that aside.
Can you explain how someone might pip install libraries to this instance of Python?
So either your command will fail to install or it will use a version of pip that is on PATH but was installed by some other version of python. So in either case you can't install a library into what you are mistakenly calling a system python.
So the original assertion was not true and you have not been able to make up an ex post justification for it.
% ls -la /usr/bin/(pip3|python3|clang)
-rwxr-xr-x 77 root wheel 119008 4 Aug 12:31 /usr/bin/clang
-rwxr-xr-x 77 root wheel 119008 4 Aug 12:31 /usr/bin/pip3
-rwxr-xr-x 77 root wheel 119008 4 Aug 12:31 /usr/bin/python3I was having trouble understanding the scenario you seem to have in mind because it never occurred to me that someone would try to run Python without doing an install from python.org as I explicitly recommend.
If someone does install a version of Python from python.org, it puts the bin folder for that version first on PATH via this line in .zprofile:
PATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:${PATH}"
It also puts a symlink for python3 and pip3 into the `/usr/local/bin` folder that comes ahead of `/usr/bin`.
So if the user runs
`pip3 install ...`
it will not find the version in `/usr/bin` because there will be two other directories ahead of it on the path that have an instance of `pip3`.
As an aside, if they do the improbable and run something like
`/usr/bin/pip3 install ...`
or if they do not have any Python from python.org installed and run
`pip3 install`
what they will end up with is a user-install that puts libraries under their `~/Library` directory because (at least on an Apple Silicon mac) pip can't write to `/usr/bin`. This fallback to a user-install is confusing to people who encounter it, but it is very different from "installing to the system python."
To summarize, it is exceedingly unlikely that a student who is not comfortable running commands from the terminal is going make the mistake you seem to be worried about and end up with libraries in the user-install location:
1. They do not install an official Python even though that is exactly what I recommend.
2. They do install XCode or XCode Command Line tools, then try to use `pip3 install ...`
Arguably step one is: https://docs.anaconda.com/anaconda/install/uninstall/
Or for miniconda: https://gist.github.com/pulkitgangwar/421a1af800c5a9c6d4a77b...
Then, adopt `uv` instead, for all your Pythons: https://docs.astral.sh/uv/
The 2024-08-24 update finally does "all the things" — unified Python packaging: https://astral.sh/blog/uv-unified-python-packaging
. . .
PS. I noticed this original article's subsequent blog post gets into "env as code" but for "one tool to rule them all" one may want to consider a tool such as `mise` instead: https://mise.jdx.dev/about.html
uv looks great, but its coming from a VC-backed company with no apparent way to monetise. Discussion here:
You have no idea what Astral’s other (future) plans include. For example, what if they are working on all this tooling so they can start providing “verified, reproducible Python packages” as a service, to mitigate against supply chain attacks?
Telling people not to use Astral’s products because they are VC-backed is silly, especially since everything they’ve done so far is permissively licensed.
I think there is a consensus about what a student should end up knowing. Even if they are not going to become developers, they should be able to edit text files; they should be able to run commands from the terminal; they should understand PATH. They should create a virtual environment every time they start a new project.
Where we might disagree is how to get them to the point where they know all those things.
I offered to write this post for a colleague who is now facing the issue I faced when I taught last spring. My only goal was to help the students who can't get started running Python from python.org. When I say that they don't know what an editor is or how to use the command line, I just taking those as the facts on the ground. What I didn't say (at least not very clearly) is that they need to learn these other things. I did hint in the end that some of these probably need to come before learning to use a virtual environment. I know this is controversial.
Because the first post was narrowly focused, I wrote a subsequent blog post called "Environment as Code" that is more specific about the goal and offers a specific sequence to follow to get there.
If you have any reactions, I'd be interested to hear them. In a deep sense, I think that the issue here is how to free students from the GUI. If we can do this, it will change how they interact with the computer for the rest of their lives. If there is a better way, I'll be happy to support it.
> Although one can install a plain-vanilla Python and all required libraries by hand, we recommend installing Anaconda ...
In a novice course, if the official version of Python and its tools all work, why is this organization recommending a product from a for-profit organization that requires acceptance of some complex and potentially costly provisions in its terms of use?
Dealing with environments and understanding how different parts of the filesystem relate to each other is its own pretty steep learning curve. You wouldn't want them to get tripped up on that while they are learning to program, so I think I would opt to teach the two as entirely different concepts and not mix them at first.
No idea if an appropriate IDE/plugin combination exists! Surely there is one.
A second alternative is the Idle environment that is included with every official install of Python from python.org. I have not used it much and I've never tried to teach a course with it. But it comes from the most trustworthy source in this complicated environment.
I'd be very interested in hearing about experience using these to start learning from the very beginning or using them to teach a course for people who are just getting started.
On Unix, it is even trivial to have parallel installations.
Build two pythons:
./configure --prefix=/home/foo/a && make && make install
make distclean
./configure --prefix=/home/foo/b && make && make install
Install packages: /home/foo/a/bin/python -m pip install bar
/home/foo/b/bin/python -m pip install quux
This is completely isolated. You can do the same by using the Windows installer to install to different directories. If an installation breaks, remove it and reinstall.My experience is that people who recommend various environment software often like strict bureaucratic procedures, or have a financial interest in pushing the software or are simply not experienced and do what they are told.
The general observation I would add is that these change with the level of experience of the person writing the code. I found it helpful and harmless to avoid them when I was experimenting. Now, I use them automatically.
I know that it made people angry, but I think it was reasonable to say that if someone does not know how to edit a file and is not comfortable using the terminal, they are not ready for virtual environments.
Re separation, another option is the one I recommend in the "Environment as Code" post: Right now, I'd suggest installing
- Python3.12
- Python3.11
- Python3.10
Then use edits to `.zprofile` to specify which will be used in any terminal session. It does require the use of an editor to make changes to `.zprofile`, which is where the official versions put the lines that add things to the user PATH. I think it is very helpful to get people familiar with how profiles set PATH for any terminal session and how easy it is to control by commenting out or commenting back in lines in `.zprofile`.
Later, one can introduce them to `.zshrc`.
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.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.
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.
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
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.
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.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.
Hyper-specialisation to the point where you "know python" but do not "know environment" (be it environment variables, virtual environments, shells or operating systems) seems like a rather pointless exercise.
If, however, someone wants to scope their class to teaching only a single thing and dismiss everything else and stick knowledge in a silo, why not provide them with a preconfigured option? This is an avenue that works with many languages, with or without GUIs, and with many steps or very few:
Maybe a Docker Container and a free download of Rancher Desktop (for any major OS) is a good option. You give them 1 link and 1 command (or just a picture of the GUI!) and you're good to go.
If that doesn't work because you're using some sort of fancy editor that doesn't work with containers, the fancy editor (like PyCharm Community) usually comes with a built in option to spawn a managed python environment just for your project. So that's a second great option to "solve" this problem that shouldn't exist in the first place.
If both of these options are too 'big', there is the super simple option of not involving the local computer at all. Stick them in a webbrowser. From CodeSpaces to just Python playgrounds, there are a ton of indestructible options to pick from. Works for other languages as well.
All of this will allow anyone to not learn anything about where a language and runtime sits or how to make it do what you need it to do, and instead you can write a bunch of code that doesn't interact with the world at all, but still get a certificate that says that some course was followed.
Despite the myth, it is not hard to use unless you need to package something complicated or messy. Then it may become hard.
The advantage of Nix is total version reproducibility and declarativeness. It's quite reassuring to know things are exactly the same on all computers.
I wish though, that at my job people were as far as using Nix oder Guix though. Still a long way off of that. Wish people would explore more on and off the job, to realize the potential.
Most of package managers don't offer that guarantee. Only Guix has a similar level of assurance?
Nix openly recognizes outputs are different per platform, x86_64-linux is different from aarch64-darwin. Impossible not to, as ultimately architectures may behave differently.
I feel somewhat blessed that I get to work on tools at a company that can support a dedicated tools team. We are free to use the best tool for the job without needing to worry about popularity contests, and nix has truly been a game changer for us.
Frankly, the biggest problem is that it needs some better docs, i.e. some serious corporate funding to get them written.
Programming language-specific dependency tools succeeded due to their user friendliness, however abysmal they are in multi-language / OS dependent environments (and I despise them for that reason). Cargo.toml, go.mod, conan.txt, Dockerfile etc. all are can be understood by basically all members of a dev team. You cannot say the same for Nix for most devs in a team.
We still use language-specific tools for those dependencies, though, since that is what people are familiar with. I think this strikes a fine balance: nix describes the “operating system” that we all work in, and then Cargo, npm, etc lockfiles describe each language’s dependencies.
The problem is that everything works--until it doesn't. And then nobody knows how to fix it.
You wind up needing a single person who serves as local "nix tech support" who then hates life because he's a high end devloper dealing with nix n00bs all day long.
As it happens, /etc/nix/nix.conf is one file where such a potential conflict can occur. As an optimization, I think it will (sometimes? always? idr) replace a file if the existing one and its intended replacement have the same contents. The defaults /etc/nix/nix.conf in the mainline Nix installer and the defaults for /etc/nix/nix.conf in Nix-Darwin are the same, so it doesn't complain there. But the Determinate Nix Installer ships a nix.conf with different settings, so Nix-Darwin refuses to replace it, to avoid clobbering your (the Determinate Nix Installer's) settings 'changes'.
There's no real compatibility issue, and the Determinate Nix Installer is doubtless intended to be used with any Nix-based software, including Nix-Darwin, Home Manager, etc. Nix-Darwin installation is just a bit hairy, as it's unfortunately always been.
NixOS is a better experience in that respect, and you should consider running NixOS in a VM if you want to get a feel for that kind of systemwide, declarative Nix configuration without worrying about installing it against a foreign base system. (If you do learn your way around nixos-rebuild, you won't need the Nix-Darwin installer anyway.)
But seriously, let's say you have a Python project (like a Django application with a couple requirements in your `requirements.txt`), what is the least disruptive way to get it working? Many things I've looked at involved doing one-time transformations of requirements files or otherwise easy-to-desync things...
It’s also excellent documentation, written by someone who clearly knows their audience. It keeps all operations in GUI-land, which most users consider more safe. It avoids almost all technical explanations.
Folks responding with “Terminal is easier” are missing context. You’re not the audience. The fact that you can come up with seven solutions for this proves that :)
Which is unfortunately exactly what enables so many tech support scams, so I'm not sure it's a pattern worth reinforcing.
In addition to that, while it might still be helpful for completely non-technical users, I really don't think "avoiding the terminal and edits to files" is a desirable goal for anyone studying either Python or data analytics.
Most people learn computers because they want to get better at a task, like programming. The point of this post is to help people get unstuck so they can begin learning at all. Adding more gates in front isn’t going to help.
"Many of these students have not used the command line."
I'd suggest that we are failing to teach students learning to code, the basics of how to use computers. Pre-requisite should be a class on how to use the command line.
The CLI is literally just: You write a command and a thing happens. That isn't a thing that people get hung up on. The main weirdness you need to tell them about is how to select/copy/paste and use the history. Throw in a lesson about how paths work. Sure the commands need to be remembered but for a start you basically just need pwd, cd and python/python3.
You are not doing your students a service if you try to teach them programming by shielding them from anything that could give them a feel for the systems they develope for.
That said, I do resent people who claim CLIs are harder because of that. What works for one person may not work for another.
I think we massively underestimate what people are able to do – if motivated. Making sure they are motivated is our task. The CLI is awesome and not just for full on nerds.
When I shown the CLI I make sure to switch white on dark text to dsrk on white text. First it is more readable that way on a projector, second people are less likely to switch their brains off. A bit like xkcds idea to make graphs look hand drawn to reach people better.
Somw of them might know more about files than they wish they would, e.g. the group whom I showed how to manually read broadcast wav file using a hex editor. Of course as an example to figure out where the actual data of an audio recording goes and what role metadata plays.
"statistics arguably is not a branch of mathematics. It is a mathematical science, built upon the mathematical discipline of probability. Some ways in which mathematics and Statistics differ include: Statistics often does not produce definitive conclusions whereas mathematics usually does."
LLM's give you what you want to hear.
Now get some live quotes, both for and against, from actual working mathematicians.
There are a lot of definitive conclusions about lines | planes | surfaces that "best fit", by many metrics, sampled data, etc.
anyway, on reflection, the word "is" does not fit here.. statistics and mathematics are not disjoint, but no, statistics is not a field of mathematics.. ask around among people with serious graduate studies in mathematics and they will fill you in.. Maybe it overlaps into the academic practice and their department structure too.
A little knowledge is often dangerous. Sometimes it makes one look like a fool.
They are plugged into the backend of many search engines these days and they excel at picking out the nature of the pattern | result that a questioner wants and feeding back what they want to hear.
> ask around among people with serious graduate studies in mathematics and they will fill you in
I checked in with Terence Tao who I first met at an Australian math club get together in the mid 1980s .. he pointed out his 2007 paper on The Dantzig selector (a novel statistical estimator for linear regression) and seems fine accepting statistics as part of mathematics.
I'd hate to cite myself given my rather dull work, but I feel that Terrence surely qualifies as someone "with serious graduate studies in mathematics" given his Fields Medal and UCLA professorship and all that jazz.
Do you have someone more qualified in mind?
Emmanuel Candes, Terence Tao "The Dantzig selector: Statistical estimation when p is much larger than n," The Annals of Statistics, Ann. Statist. 35(6), 2313-2351, (December 2007)$\tau as \epsilon$!
But I feel all this discussion has gone off topic that was the teaching of statistics in our post- (post-?) modern era.
Beyond the attention seeking 'tips of the day' kind of popups in random places and stages that derails you all the time (I mean: ALL the time) but at least so tiny little fragments of wisdom that you reamin the same clueless, well inside the error of measurement in cluelesness. Only good for putting The Product into the focus (Am I nice, eh? What a cool feature I have, eh?! Brilliant am I, eh?!) instead of the need of the users.
Of course I'm quite a bit biased because the majority of these people are coming to me for help...
Back to Anaconda. It's great system, and the problem is people learn how to use ML or whatever using Anaconda, and then when they get into the workplace, you need a license.
I really wish organizations would just buy licenses for the users that want them, it's so much of a pain to work around not having Anaconda. Their prebuilt packages are pretty helpful and time-saving, even thought you "don't need it" and you can get along with using just pip, but you'll have to provide workarounds for projects that use Conda.
I had a pretty rough time with Anaconda Team Edition when it was rolled out by my employer. The security team required that any package with a high CVE score be filtered out of the on-prem repository. Fair enough, but it just led to packages and dependencies being constantly broken. IIRC, it wasn't possible to give normal users the ability to view CVE scores, which just compounded the issue.
I do not recommend pip in serious projects, as it lacks the above. Here's things that I've seen:
- add dependencies and not save them in the requirements file - forget to activate cenv and install packages globally - different package versions across deployments due to absence of lock file - main dependencies mixed with dev dependencies
Wow this is so deliberately ambiguous about universities with more than 200 employees. Shameful.
TLDR - we are working to clean up this language to leave it clear that educational institutions are exempt, and that these commercial terms do not apply to third-party channels hosted at anaconda.org (which includes conda-forge).
Show us don’t tell us. I’d love to not have to continue the rip and replace job ahead.
Edit: this linkedin response sums it up well. Not certain what guarantee you will make to research institutions’ leaders that is going to lift those blocks.
However, please tell this to your sales/legal teams: the nature of their approaches has been somewhat poisoning the well. If leadership’s first encounter with a piece of software is: "you are in legal trouble", the reaction you're going to get is: "remove and block that legally dangerous piece of software at once", rather than "oh yes we should license it". We do buy licenses for software, we view it as giving back, but how the offering is first presented matters.
When I talked to them four years ago, they agreed we were good to use it for free, no problem.
The dollar figure they're asking for would make it the single most expensive software product we would be licensing in our enterprise, by a lot. The deadline is absurdly soon for such a big deal. And they opened discussion in an incredibly hostile manner and have made no attempt to work with us.
So, I'm helping lead the effort to completely purge them from our ecosystem. On the one hand, I'm sad because their stuff is pretty good. On the other hand, their behavior is bad and the product isn't better by the amount they're asking for.
Good riddance.
With $$ for unlicensed period too?
But: what's sauce for the end user goose is sauce for the developer gander. Developers are users. Give developers good visual tools. Sadly I don't think there is a visual front end to git,, for example, that is any good among the handful I have tried and the dozens that attempt to make git safe, discoverable, and visually obvious.
Python is often billed as a good language for beginners because it does not require the author to keep track of curly braces or line-ending semicolons, and it lets the author focus less on syntax and more on reasoning with code.
Wouldn't it be nice if the beginner could focus on learning Python instead of having to learn stupid minutiae that only exist because we're still trying to maintain backwards compatibility with the VT220?
As an analogy- It may be just as easy to do, but I’ll never bother to change the spark plugs in my car - I’ll have someone knowledgeable do it. Do I think it’s hard? No. Do I think I have better ways to spend my time? I do.
Octave, Matlab, Mathematica, Julia, R are superior for small programs with just a couple of functions.
Escaping the stranglehold of Python would be the next project!
Sure, but I would argue that overwhelming someone with all those topics at the beginning is counterproductive.
I learned programming (in BASIC, in 1981) before I heard about the filesystem or shell. Making more complex programs do interesting work was my reason for learning more about the innards of computer systems.
There's just a lot of people that did not grow up using computers the same way as many here. Whether it's they grew up on mobile devices or have only ever used a GUI.
I don't think it's reasonable to expect a developer to not understand command lines but plenty do not. There's whole populations of very junior programmers that have zero experience on the command line. Hell I know people with decades of Unix experience that don't know basic CLI stuff or reach for the GUI to install packages or manage things.
macOS (and the entire Unix universe) is a shitty environment for people who rarely / don't need terminal but whose job could be improved by a lot if a scripting language is used.
Microsoft used to champion intermediate users who need more power than mindlessly clicking web pages. They are now turning their products yet another copy of the other systems where you are presented with a cliff as the learning curve.
I disagree completely that a simple programming environment should require terminal access. Terminals are unforgiving for mistakes that a beginner makes. Most of the terminal capabilities should be done in GUIs. One should be able to access all files, edit them, change the OS environment variables and create programming projects in GUIs. We achieved that in 90s already. Why should we go back?
What does "Unix experience" even mean if you can't sling the basics in the shell?
Based on limited testing on Windows, Anaconda does not seem to do anything comparable on that OS.
As engineer of many many years now all I can say with certainty is that confusion, failure, research and eventually small successes have been the central theme of working with computers. I personally love the struggle and mystery but its not for everyone. At the end of the day its about what you want to get out of it. If you want to write programs without learning about the terminal go for it, but I would say there are better gilded cages with GUIs that help you get a lot more done within that constraint.
If you want a deeper understanding, I think its more helpful to admit you can't cheat the process of learning. Slow is the only speed.
Might be a lost cause in the tiktok era, but the text / command line / unix pipes paradigm of computing is extremely powerful and it would be a blessing if educators would find way to make it attractive to students...
https://blog.glyph.im/2023/08/get-your-mac-python-from-pytho...
But those might be too late if the students run into these issues during their very first weeks. And Python is pretty decent for Hello World kinds of programming-adjacent courses.
Anaconda is a distribution, which to my understanding, includes an official version of Python. Anaconda includes its own way of doing things to solve a lot of common problems people face.
Personally, I don’t use Anaconda any longer because I ran into so many issues over so many years with conda, their package manager. I’m also almost competent enough to deal with a lot of the problems that anaconda tries to solve. This likely isn’t the case for beginners.
Virtual environments are great and, I’d argue, what people should be using 99% of the time.
Try installing a specific version of an R package from more than 2 years ago, it's an exercise in frustration,
This is exactly why you should learn to use your tools properly, learn just a tiny tiny tiny bit of posix shell (which works for ALL posix shells sh, tcsh, bash, zsh etc...) so that you can understand what the heck is going on.
Like seriously, this is day one stuff. Your shell loads a configuration file and you can set programs to run on start, or configure shell options, set aliases etc... This is nuts man.
in fact I was so baffled that I wrote my own article response https://sweetbbak.github.io/post/response-to-mac-anaconda/
1) How can we get a specific group of students who feel helpless started on the path to learning?
2) What should we teach students?
In the post linked here, I tried to be clear that these are instructions for a very specific group of students who are stuck and don't know what to do. I agree that they are not the right instructions to offer to the typical reader of this site.
The comment and the second post that it references address what we should teach.
True, MacPorts isn’t the official Python installer, but macOS doesn’t have an official Python anyway.
These instructions are a fish, and don't really any is the core principles and knowledge that a developer should really know.
Yes, it fixes the problem but doesn't really address the "Why?" part at all.
There are a ton of subtleties in the build toolchain even within a single OS type, and these will lead to downstream frustrations with packages that just bundle pre-compiled versions of C/C++ libraries.
The conda approach treats the underlying libraries as first-class citizens in the package ecosystem; tracks their interdependencies; and most packages are built in such a way that they are relocatable on your filesystem and don't require system privileges to install. conda and the various packages in the conda universe (whether official ones from Anaconda or the community-built ones in conda-forge) all make it so that this baseline hard problem is mostly solved across all major OSes, and solved in a relatively consistent way.
You can think of conda as a cross-platform, cross-architecture, multi-language, userspace package manager. It grew into this because numerical Python's package ecosystem is so horribly complex and the users span such a huge set of install environments, that conda ended up having to be a generic rpm/brew/apt kind of thing.
After taking a course using Python?
i've never understood the reasoning for anything but that
Terminal can be scary, but “open terminal from Applications/Utilities” and typing “rm ~/.zsh” is objectively easier. Also that’s not even the best solution, just a far better way to do this solution.
Also, “mv ~/.zsh ~/zsh-anaconda”.
do people really want to do things they don't understand at all?
But really, for his use cases, he should be using Julia (for DSGE modeling) or else R for stats.
Still, I applaud his willingness to try new things, if more economists were like him, we might finally break the stranglehold of stata and matlab in econ.