3 ms·
What is the problem with installing python outside of JupyterLab (or „the regular way“) in your opinion? I‘m teaching Python basics for a few years now and usua
by randomluck040 4y ago
What is the problem with installing python outside of JupyterLab (or „the regular way“) in your opinion? I‘m teaching Python basics for a few years now and usually we get everything up and running with Python and VSCode in three processes as well: installing python if it’s not installed, installing VSCode and then installing the extension.
- fbdab103 4y agoI find that explaining virtualenvs alone quickly becomes a morass. You can skip the discussion entirely, but it is such a necessary step in good practices that it feels negligent to omit. Not sure about what platform or level of experience you are accustomed, but I am frequently working with Windows-only users who have never even heard of PATH. Inevitably, someone needs assistance becomes something got stuck on configuring the tooling and python cannot be found. Especially fun when it is the person's N attempt at learning Python and I discover that there is a historical half-working interpreter already present. Conda is also a huge hurdle which I try to avoid, but if I know the ultimate aim is for machine learning, gotta deal with that on-boarding.
- randomluck040 4y agoThank for answering. I understand that the interpreter situation can be annoying. There is WinPython [0] to circumvent that to some degree. I feel like if I don’t do it the „VSCode and py-file“ way, it’ll be more and more difficult to keep everything together when teaching about modularity and putting functions in helper scripts, putting tests in other directories and such. I think it’s just because I got used to using VSCode and not Notebooks although I’ve used them for a while. [0] https://winpython.github.io https://winpython.github.io
- ivansavz 4y agoThe main difficulties we've faced are around cross-platform instructions, specifically Windows. I suppose for basic Python it would be easy enough, but the complexity escalates once you need modules and have to run a `pip install` or two, because this requires learning about the command line (which some people have never seen before). Here are some examples of instructions we've had to watch out for in the past, that are no longer needed when using JupyterLab Desktop: - Windows installer: make sure to check the box that adds Python to %PATH% - Use cmd.exe not Power Shell (which has weirdness if using venv[1]) - Run the command `python -m venv myvenv` - Activate myvenv (OS-specific instructions) - Run the command `python -m pip install pandas jupyterlab` - Run `juppyter-lab` to get started - Press CTRL+C (SIGINT) to stop execution in the end It's doable, and we were able to run the tutorials since we had several co-hosts available to help beginners when they got stuck, but we definitely lose some momentum every time we try to run things this way. [1] https://docs.python.org/3/library/venv.html#:~:text=On%20Microsoft%20Windows%2C%20it%20may%20be%20required%20to%20enable%20the%20Activate.ps1 https://docs.python.org/3/library/venv.html#:~:text=On%20Mic...
- ivansavz 4y agoAnother strategy that works really well with beginners is to use jupter notebooks via https://mybinder.org/ https://mybinder.org/ links. We put all the materials on github, and then send the workshop participants a link[2] that launches a remote jupyter lab, so they don't have to install anything at all. That works well, but make sure to download your notebook in the end of the session because they are ephemeral (will disconnect if no commands for 20 minutes). [2] Example mybinder link that launches a notebook from a github repo: https://mybinder.org/v2/gh/minireference/noBSstatsnotebooks/main?urlpath=tree/./tutorials/python_tutorial.ipynb https://mybinder.org/v2/gh/minireference/noBSstatsnotebooks/...