4 ms·
Using docker is not free, you are effectively trading one type of complexity for another. And of course you'll have to make sure people equally have good pract
by BiteCode_dev 3y ago
Using docker is not free, you are effectively trading one type of complexity for another.
And of course you'll have to make sure people equally have good practices, since incorrectly using sudo pip install in docker and not a venv are very common.
So again, one possible solution for a certain context, but I wouldn't sell that to most people. Certainly not to beginners.
People writing their pythonanywhere website won't pop up a container, won't they ?
- hot_gril 3y agoFor a beginner trying to run someone else's Python project, it is free. You run one command and it works. There's tons more complexity under the hood, but you don't have to deal with it. This is why so many Python projects do resort to Docker. And btw, JS doesn't have this problem, they use NPM.
- dragonwriter 3y ago> For a beginner trying to run someone else's Python project, it is free. Its absolutely, by far, the highest friction alternative on Windows for anyone that doesn't use Docker for other purposes.
- hot_gril 3y agoIs it not just install and run? The alternative is installing Python, installing pip, etc.
- dragonwriter 3y agoInstalling python with the python.org installer installs the entirety of Python and its standard library and tools, including pip, venv, etc., and the py launcher which supports selecting from multiple python versions. Linux distros may split this up into different packages, but on Windows (or Mac, afaik, though the py launcher is a Windows-only feature) using the official installers is one-stop shopping. And, no, docker isn't just install and run on Windows. Before Docker made a heavy push for paid Docker Desktop for even personal use, it was close to that. But now the way to get a free usable docker command line is to install WSL and a Linux environment, install docker there, and then invoke docker via wsl. (Which, of course, you will not find via Docker’s own information, which will try to sell you a paid subscription.)
- hot_gril 3y agoI tried it just now on my spare Win10 desktop, and it went like this: 1. Download and install Docker desktop for Windows 2. Restart Windows (guess you don't have to do this with just Python) 3. Run Docker Desktop 4. Say "no" to signing into a Docker account 5. Wait for engine to start, which took a few minutes the first time, a bit annoying 6. Pull and run an image (I tried nginx) It was weird being asked to log in, but the "no" button was pretty clear. I didn't feel like I was forced to use WSL to avoid paying; maybe they've backtracked from something. Unity was far more convincing that I had to pay.
- BiteCode_dev 3y ago- Not if you have to edit the code. Try to explain your beginner with notepad++ how to do that. - Not if you have to deploy the code. - Not if you have to import the code in your own project. Basically, not if you want to do anything by running the code. For which I would suggest an installer instead.
- hot_gril 3y agoI don't see what editing has to do with this. Whether you're running the main.py or the Dockerfile, if you want to edit the code then you gotta use Notepad.