9 ms·
Escaping from Anaconda's Stranglehold on macOS
- gojomo 2y agoWell he didn't win a Nobel Prize in Python best practices, that's for sure.
- kamma4434 2y agoI’m not sure about what the problem here is. If the target user cannot be bothered to learn about “the shell” why should they care about the Python vendor? And the procedure shown is not easy peasy for a newbie.
- stackghost 2y agoTFA is for students who are (presumably) very early in their programming careers. 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?
- kamma4434 2y agoBut you can learn Python with Anaconda. At the point you are sophisticated enough to outgrow it, wouldn’t you be better offering a drink or two to your sysadmin friend and have them fix it? 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.
- freehorse 2y agoIs dragging and dropping the .zshrc file the easiest way to run anaconda on a mac? It sounds incredibly inconvenient to me, and considering it is intended for people who are clueless about terminal and .zshrc, it may result in a mess with different .zshrc versions in case one installs anything that runs through terminal and changes .zshrc, which can be a lot of things.
- gkfbn 2y agoAt some point they'll have to learn about the file system, shell, network. Otherwise there is little point in learning Python. 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!
- OldGuyInTheClub 2y agoWell said. I am grateful that my employer licenses Matlab, Simulink, and a lot of toolboxes and blocksets. The IDE and especially the documentation help me get stuff done. We've had waves of Python as a Matlab killer first with Enthought and then Anaconda as the repository. I gave Python an honest try but was spending all my time searching for help on package after package with poor to no documentation and trying to debug code with substandard tools.
- zelphirkalt 2y agoMatlab is a categorical loss due to its proprietary character, R debatable, Julia, maybe yes. Octave, while at least not proprietary, still surely not, if the task is anything but some matrix multiplication or matrices using program.
- zem 2y agojulia has an unacceptable overhead when running small programs. it works well for longer running workloads or extended interactive sessions, but for learning you want to be able to write and execute small scripts without feeling the perceptible lag every time. google up "time to first plot" for more on this.
- xgdgsc 2y agoIt' s quite acceptable with 1.10.
- stackghost 2y ago>At some point they'll have to learn about the file system, shell, network. Otherwise there is little point in learning Python. Sure, but I would argue that overwhelming someone with all those topics at the beginning is counterproductive.
- BoredPositron 2y agoProbably because of anacondas licensing change...
- mattl 2y agoThis seems like a lot of work to bypass something in the zshrc file vs. doing something in a terminal emulator? I would assume Python developers are somewhat forced to use a command line anyway.
- cowsandmilk 2y agoAs described on https://docs.python.org/3/using/mac.html https://docs.python.org/3/using/mac.html , python on MacOS both ships with an IDE and the ability to run scripts without using the command line.
- mattl 2y agomacOS doesn’t ship with a version of Python anymore?
- whywhywhywhy 2y agoSeems a complete farce to learn Python without learning how environments work seen as the way it's designed it's impossible to use for more than a single project without them.
- adolph 2y agoAnaconda’s hidden license for institutions is a dark pattern time bomb for scientific computing.
- williamstein 2y agoCan you elaborate? Is there a link?
- kanche 2y agoA news on the same: https://www.theregister.com/2024/08/08/anaconda_puts_the_squeeze_on/ https://www.theregister.com/2024/08/08/anaconda_puts_the_squ...
- sunshowers 2y ago> use by individual hobbyists, students, universities, non-profit organizations, or businesses with less than 200 employees is allowed, and all other usage is considered commercial and thus requires a business relationship with Anaconda Wow this is so deliberately ambiguous about universities with more than 200 employees. Shameful.
- pwang 2y agoI posted an update about this: https://www.linkedin.com/posts/pzwang_hi-everyone-recently-there-has-been-discussion-activity-7229549723462905856-rQH- https://www.linkedin.com/posts/pzwang_hi-everyone-recently-t... 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).
- sunshowers 2y agoThank you. I do hope you reflect on how ambiguous the language was allowed to be for years.
- 2y ago
- fhdsgbbcaA 2y agoClickbait title (“stranglehold”, really?), and also really bad advice. 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.
- striking 2y agoIt sounds like they want to be able to restore it too. And the Terminal is harder to use than a graphical step by step guide.
- fhdsgbbcaA 2y agoThis guide requires holding down arcane secret key combination, this is not remotely normal way to do anything, and prevents people from learning basic system commands every programmer needs to know. Also, “mv ~/.zsh ~/zsh-anaconda”.
- g8oz 2y agoHis audience is not programmers.
- fhdsgbbcaA 2y agoIt quite literally is for students learning Python.
- cowsandmilk 2y agoHe is an economics professor, not a CS professor. His students may be going into jobs that require programming, but that doesn’t mean they are “programmers” or that the purpose of the class is to teach Python.
- drozycki 2y agoPythons and anacondas are snakes which catch and kill their prey by strangling them and inducing cardiac arrest. It’s a pun.
- m4rtink 2y agoIndeed, it is high time for a new Fedora installer for Macs, the Anaconda monopoly needs to be broken! ;-)
- Q6T46nT668w6i3m 2y agoNobel laureate Paul Romer sharing some Python advice is a little strange!
- magnio 2y agoWhatever project solves Python dependency management deserves to get a Nobel in Economics for saving humanity billion of hours per year.
- zelphirkalt 2y agoUsually I simply use pip and poetry. Haven't run into an issue in a long time. Privately I use Guix often, when it has the required packages. I find the dependency management mostly to be already solved. Perhaps I am not riding along the edge enough, to see things broken.
- pnt12 2y agoPoetry does a lot of good stuff: lock file, dev dependencies (and other customizable groups), easy to use virtual env, dependencies pulled directly from git. 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
- kevin_thibedeau 2y agoPip has gone down the shithole with its preaching about venvs. It's my computer. I'll install to site-packages if I damn well want to.
- zelphirkalt 2y agoWhat I usually do is make a venv using pip, then use that venv to install poetry in it, because I don't want to clutter my system with outdated poetry package. Then use Poetry to install packages inside the venv. So the pip part is merely for bootstrapping.
- brewmarche 2y agoYou 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.
- nextos 2y agoI collaborate with people that use macOS while I use Linux. For reproducible environments, Nix has served us well. 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.
- zelphirkalt 2y agoI am fully on board with having reproducible declarative setups, line Nix or Guix offer. I want to note though, that the versions and original code may be the same, but it can still happen that something behaves differently on another OS. The code of some version of a package can intentionally do things differently on another OS. So you are not 100% safe from MacOS disturbing things. 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.
- nextos 2y agoSure, but if you run the same Nix flake on two macOS machines with the same architecture, it will have the same behavior. 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.
- mplanchard 2y agoWhat we did at our job was I set up a nix config for myself, because I wanted it. When new people onboarded, they had two options: install this list of software or install nix and it’ll all get installed automatically. Enough people chose to use the nix config over time that it became the de facto standard.
- hamandcheese 2y agoI like this strategy. Nix can be tricky to explain, so sometimes showing is much easier than telling.
- rfl890 2y agoAvoiding sh overcomplicates this. Just give them a one liner: mv ~/.zshrc ~/._zshrc and vice versa. Pasting a cmd is not rocket science.
- giantrobot 2y agoMan you say that but many people simply do not understand that a command even is. They don't know to hit return after pasting or how much of the command to copy. Or they'll paste it in a text editor. 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.
- bpmooch 2y agothen they need to stop what they are doing, and learn how to use the system they are running first. there's no value in skipping ahead of basic "power user" learning for your preferred os. if you can't run basic commands, you dont' need to be writing python programs. if your educational institution is not providing you basic knowledge on how to use windows, macos, or linux, they are unfortunately failing you.
- okanat 2y agoThis PoV of software is why Excel (or Microsoft products in general) almost always wins against any database or specialized tool for creators, engineers, accountants alike. 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?
- sweeter 2y agoThis is insane lmao. Why not just edit out the line that added into your .zshrc (or by extension the .bashrc) instead of running through all these complicated GUI specific things just to basically rename the file so that ZSH doesn't load it when it runs a shell??? 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/ https://sweetbbak.github.io/post/response-to-mac-anaconda/
- easeout 2y agoWhile I agree in principle, this is a professor sharing as foolproof a method as he can find to get many students, whose existing knowledge, setup, and CLI avoidance he can't control, to the meat of the course experience he has designed for them.
- promer 2y agoFYI, I offered a comment above that might clarify. There are two questions: 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.
- Zigurd 2y agoAs expected, I see comments here like "Avoiding sh overcomplicates this." It's true. I found the shell-avoiding instructions no better, and possibly worse, than shell commands. 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.
- mplanchard 2y agoWish there was something like magit outside of emacs that I could recommend to people.
- 3np 2y agotig?
- progmetaldev 2y agoThis may be a backwards way to go about it, especially with an end goal of learning Git, but I feel that having learned Mercurial first helped me to more easily move to Git. Ultimately, it was using BitBucket's Mercurial repositories, and then Atlassian stating they were discontinuing Mercurial that forced me to jump to Git. Wanting to keep my Mercurial history forced me to learn parts of Git that I otherwise probably never would have touched. It seems Git has (at least for the present and near future) won the SCM wars for popularity. Working with mostly front end developers unfamiliar with code tools made me the go to guy at work, so I had no choice but to learn as much as I could about handling conflicts, as well as things most people rarely think about like a project's .gitignore and .gitattributes
- deleted 2y ago[deleted]
- mikae1 2y agoThe truest XKCD ever: https://imgs.xkcd.com/comics/python_environment_2x.png https://imgs.xkcd.com/comics/python_environment_2x.png
- sonofhans 2y agoThis is really elegant. What a nice solution; single-step and reversible. 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 :)
- lxgr 2y ago> It keeps all operations in GUI-land, which most users consider more safe. 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.
- sonofhans 2y agoNotoriously, people get to desire their own goals, and there’s little that we can do about it. Plenty of people desire to learn and use Python without the terminal. That’s 100% possible in a professional environment today, never mind a classroom. 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.
- latchkey 2y ago"If you teach a course that requires Python" "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.
- atoav 2y agoI thought a class of entirely non-tech art students how to use the commandline to run their python code within an hour and that includes distractions like people using multiple different operating systems and explai ing how paths work on each. Tech inclined students get the gist of the whole thing in less than 15 minutes. 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.
- Gimpei 2y agoMy takeaway from this article is that Paul Romer doesn’t know how to use the environment feature in anaconda. If he has a problem with dependency resolution speed, ‘conda install mamba’ will solve that. 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.
- markhahn 2y agoreminds me of instructions for using curl|bash. do people really want to do things they don't understand at all?
- apetresc 2y ago> 10. What Changes When You Are Free > 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`.
- dumbo-octopus 2y agoYes. I recently had to debug my gf’s entire work computer setup getting fubar’d from installing a pip package at a user level that conflicted with the name of some package used internally by the 10k+/seat/year software the company devices have installed. Proximal cause? The installer “helpfully” failed over to installing at the user level when she didn’t have permissions to write to the place she told it to. Root cause of course is that million dollar fancy fancy enterprise software somehow being unable to give itself an isolated python package namespace, or provide any relevant errors when conflicts occurred. The python packaging system has to be used in case studies of worst design decisions of all time.
- adolph 2y ago> package used internally by the 10k+/seat/year software the company devices have installed Sounds like a skill issue that shouldn’t be seen in “10k+/seat/year software.” I wonder what other fails are in it.
- dumbo-octopus 2y agoWell it constantly crashes and requires every shop to develop their own half-broken way of interfacing between it and other industry-standard software, but at least ~half the pixels you’ve seen in any modern movie or tv show have been touched by it at one point or another. So that’s interesting.
- puppycodes 2y agoI always appreciate a post about a simple fix to a problem a lot of folks run into thats not esoteric and lays it out simply :) 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.
- zjp 2y agoI still don't really get what conda is or does. AFAIK it ensures ABI compatibility between Python packages that have C extensions? Does manylinux and the limited API not take care of this?
- adolph 2y agoWay back Anaconda was an accessible way to get Numpy running without having to scrounge up a Fortran compiler for one’s MacOS version.
- pwang 2y agoWhat if you want to ensure that the same packages are available, built in a similar way, between your Mac and some linux servers? What if you need to share or ensure that your projects work between Linux and Windows? What if you are supporting a lot of less-sophisticated users across a number of different OSes, or even different versions of the same OS? 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.
- farhanhubble 2y agoThis is typical solve-one-problem-with-another approach. Anaconda may be bloated but it is really straightforward to use from the navigator and yes you can have many different Python environments installed at the same time.
- byyoung3 2y agocant you just do 'conda deactivate' until its gone?
- rbanffy 2y agoI’m so happy with MacPorts I find all this discussion weird. True, MacPorts isn’t the official Python installer, but macOS doesn’t have an official Python anyway.
- renewiltord 2y agoI use mise for version and virtualenv. It works.
- bluedino 2y agoI work in HPC, and for all the Python programmers I come across, I'm surprised at how few of them know details about package management etc. 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.
- scrlk 2y agoThe Anaconda Distribution has pretty good coverage of what scientific/technical Python users require. I'd wager that they rarely need to concern themselves about package management. 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.
- RayVR 2y agoWhat is an “official version of python”? 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.
- viewtransform 2y agoWhat do you use in place of Anaconda ?
- npalli 2y agoContrast the python experience with R, MATLAB, Mathematica, (even Julia). That should be what python ecosystem should aspire to. Blaming students for not understanding command line, virtual env, package management versioning etc.. and screwing around with magic incantations (to them) is just a sad reflection of how unfriendly this frankensystem is. Doubly sad that python is the default way to learn anything nowadays.
- _Wintermute 2y agoPython's package management isn't great, but at least it exists. R is absolutely awful in this regard, 99% of packages don't even specify versions for their dependencies. Try installing a specific version of an R package from more than 2 years ago, it's an exercise in frustration,
- viewtransform 2y agoTIL : Shift, Command, . to reveal hidden files!
- ericjmorey 2y agoPixi works on MacOS. It's way better than anything else at this point.
- smlacy 2y agoIf you give a man a fish, he eats for a day. If you teach a man to fish, he eats forever. 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.
- quailfarmer 2y agoIt’s always baffled me that the default configuration of conda takes the liberty of contaminating the default shell environment. It feels incredibly bold to assume that because I install conda I want it to exist in every context in which I use my computer. It’s the terminal equivalent to an adware “toolbar” installing itself in your browser.
- promer 2y agoThanks for making this point. People who work on Windows may not realize how aggressive and disruptive Anaconda is on macOS. If you open a terminal and run the `lipo` command that macOS gives you to get information about a file, you will be running a version of that command that Anaconda installed, not the one that Apple manages and updates. And `lipo` is just one of many such examples. Based on limited testing on Windows, Anaconda does not seem to do anything comparable on that OS.
- ks2048 2y agoNot only that, installation edits some of your dot files without ever telling you or asking permission.
- bmitc 2y ago> Many of these students have not used the command line. Many do not understand the difference between a text editor and a word processor. After taking a course using Python?
- Terretta 2y agoThis seems very "Anaconda's a mess, so here's this one weird trick" then suggests a foot-gun. Arguably step one is: https://docs.anaconda.com/anaconda/install/uninstall/ https://docs.anaconda.com/anaconda/install/uninstall/ Or for miniconda: https://gist.github.com/pulkitgangwar/421a1af800c5a9c6d4a77b1c252f4565 https://gist.github.com/pulkitgangwar/421a1af800c5a9c6d4a77b... Then, adopt `uv` instead, for all your Pythons: https://docs.astral.sh/uv/ 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 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 https://mise.jdx.dev/about.html
- teruakohatu 2y ago> Then, adopt `uv` instead, for all your Pythons: https://docs.astral.sh/uv/ https://docs.astral.sh/uv/ uv looks great, but its coming from a VC-backed company with no apparent way to monetise. Discussion here: https://news.ycombinator.com/item?id=35617198 https://news.ycombinator.com/item?id=35617198
- mirashii 2y agoIt's licensed MIT and Apache 2.0. The community can fork it if it ever becomes an issue.
- eddyg 2y agoYet. 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.
- promer 2y agoI think your suggestions are for people who know more the students I meet in the classroom.
- oneplane 2y agoIf your students are in a software engineering or engineering adjacent context, they should have some idea as to how the things they use are put together and how to adjust them. 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.
- promer 2y agoI appreciate all the comments. I agree with most, even when they disagree with me or each other. I especially agree with the questions several people raise: What it is that we should teach? In which order? 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.
- fergie 2y agoAre you familiar with Software Carpentry? If so, what do you think about it? -> https://www.ub.uio.no/english/libraries/dsc/carpentry-uio/ https://www.ub.uio.no/english/libraries/dsc/carpentry-uio/
- promer 2y agoIf you visit the link https://swcarpentry.github.io/python-novice-inflammation/ https://swcarpentry.github.io/python-novice-inflammation/ which offers the introduction to Python, you'll find this strange statement. > 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?
- jonhohle 2y agoNot https://en.m.wikipedia.org/wiki/Anaconda_(installer) https://en.m.wikipedia.org/wiki/Anaconda_(installer)
- openrisk 2y agoAlas, the audience targeted by the post would most likely have preferred a video of the instructions rather than text. For tasks related to configuring a visual computing environment (such as the desktop), this would also make some sense. 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...
- BlueTemplar 2y agoThat website has both.
- swiftcoder 2y agoJesus Christ. Teaching students to program in Python by "incantation" should be an explicit non-goal. How bloody hard is it to explain what an rc file is, and how to edit one?
- thecleaner 2y agoInstall python from source into a directory that does not need sudo. Use poetry init and poetry install to do the rest. Poetry manages the environment itself. I have been using this setup for a while and it works quite well.
- jbverschoor 2y agoInstall orbstack, problem solved. Want isolation per project / a “virtual environment”? https://github.com/jrz/container-shell https://github.com/jrz/container-shell
- apwheele 2y agoThis seems to come from a place that "learning virtual environments is too much work". I do not agree with that premise. Having a lab where you introduce environments and the command line (which you can do in a single class for the types of students Paul is talking about) is not a big deal and to me is a good use of time.
- INGSOCIALITE 2y agopython -m venv .venv source .venv/bin/activate i've never understood the reasoning for anything but that
- emmelaich 2y agoRelatedly, this seems to be the best advice for installing and using Python on t he Mac. Probably applies to Windows as well. https://blog.glyph.im/2023/08/get-your-mac-python-from-python-dot-org.html https://blog.glyph.im/2023/08/get-your-mac-python-from-pytho...
- bitfilped 2y agoWhy not teach students how to work with their .zshrc file and become better computer users? I've never understood the aversion in academia to teaching people how computers work. This could be "fixed" with a simple sed line or `vim/emacs/nano ~.zshrc` rather than a multi step process of dragging files around and futzing around in the UI. I see this all the time in higher ed, so much wasted time and effort coming up with long complicated procedures that appeal to people unwilling to learn the basics of computers rather than just teaching effective computing usage. Especially now in an era where computers are a tool almost everyone needs to know how to use to succeed in the workforce, it just doesn't make sense. Learning how to be effective in Unix should be a required 100 level class for almost every major by now.
- BlueTemplar 2y agoWhat aversion ? Generalist basic computer usage courses are mandatory in undergrad, and this includes basic Linux command line usage and shell scripting. 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.