Live data from Hacker News

JupyterLab 3.0

blog.jupyter.org

111–120 of 145 posts

Re: JupyterLab 3.0

#111
post #101
post #14

I don't write Python code for my work. Last weekend I came across an interesting Jupiter notebook and figured I'd give it a try on my work laptop. "It's probably as easy as brew install pip and then use that to load the other dependencies," I assumed. Over an hour later I had to give up. There was initially some kind of Python version conflict on my Mac. Eventually some version of JupyterLab was installed somewhere,…

> I don't think it's Python's fault. Well, there's a long legacy of half-baked solutions and kludges. And, especially, install instructions consistently suggest you do the worst thing: install stuff using pip. Everyone knows that's bad advice, because it always fails in mysterious ways, and there's no good way to roll everything back. I recommend: python3 -m pip install pipx # Don't rely on the pip3 bin. pipx install…

Yup this is a good way to go around it, similar to another comment below, I use conda to manage all the stuff

Re: JupyterLab 3.0

#112
post #101

Earlier quoted context omitted.

> I don't think it's Python's fault. Well, there's a long legacy of half-baked solutions and kludges. And, especially, install instructions consistently suggest you do the worst thing: install stuff using pip. Everyone knows that's bad advice, because it always fails in mysterious ways, and there's no good way to roll everything back. I recommend: python3 -m pip install pipx # Don't rely on the pip3 bin. pipx install…

I use conda to do effectively the same thing. If my conda environment breaks and I can't roll it back, at least I can destroy it and start again. As an aside; it is really hard to explain why you should use anything but pip3 to people who only rarely need to interact with python.

Conda is pretty nice, and unless someone needs pypi, that's fair advice.

And I agree, it's hard to explain not using pip3, so I just wouldn't. "For the best experience, pipx install neato-commando." And maybe link to the pipx website, in case someone actually clicks a link.

Re: JupyterLab 3.0

#113
post #102
post #63

Earlier quoted context omitted.

> OSX and its tooling are just ridiculous. I have no idea to this day how macs became the premier development environment. Because: (a) it's quite easy to set things up with brew, macports, and/or Nix (b) because Python is shitty everywhere anyway, and Python isn't the be-all end-all of development work. (c) because you get a full-featured, working, coherent, take-it-or-leave-it desktop that stops one way of endless…

I think it's more inertia than any of these things. The entire point of this thread is that (a) is false -- see grandparent and the xkcd joke. It's not easy. It pretends to be easy, but is usually broken in some crazy way instead. Apt is also easy, but it actually works more often than not. (c) was relevant in 2006, when the novelty of OS X was that it was a UNIX that you could actually use as a daily driver. This is…

>(c) was relevant in 2006, when the novelty of OS X was that it was a UNIX that you could actually use as a daily driver. This is what initially got developers to move to Mac. But it's been fifteen years, and all jokes aside, the "year of the Linux desktop" for developers was probably around 2012. Linux may still have issues, but they're not worse than the hoops you have to jump through to make today's macOS behave.

I've used Linux for close to 20+ years, and Unices more, and never had to jump through any major hoops to make macOS behave.

What would those be (talking about something major, not "I can't get my favorite window manager to replace the macOS window management" -- the non-tinkering-friendliness is part of the allure to me and from what I read others too)?

On the other hand, Linux on the desktop never fails to dissapoint me in one way or another because of the need of tinkering, half-sketched apps for many things I want to do (especially anything multimedia and/or document related), driver issues to get things working (sound, compositor, 3D, bluetooth, sleep, etc), and so on. And judging from the everpresent "just use " in the relevent forums, it's not something others don't have.

Thus I prefer to stick to Linux on the server and Docker, or for setups where I have investigated the hardware in advance, and only mean to use basic things (e.g. happy with just some terminals, emacs/vim, i3, and some mp3 playing).

>not because they actually ask new hires what they prefer.

Those that do found that hires generally prefer Macs. That's how they have ~ 50% of the dev surveys on Stack Overflow whereas they're just 10% of the general market...

Re: JupyterLab 3.0

#114
post #75

Earlier quoted context omitted.

In a better world, the notebook you downloaded should have come with a list of dependencies and have reproducible code in it. That said, Python environment tools and package managers are still in a state of flux. Some tools make it easier, but are not helping much with reproducibility (plain venv + pip, but only if you got all required system packages installed!), other tools enable reproducibility, but have growing…

I talked to Fernando about this at Neuroinformatics 2018. In principle generating dependencies from a notebook should be as easy as parsing the ast, finding all the import statements, and then using sys to lookup what package provided that module. In practice I stopped using notebooks entirely due to many of the issues described by pavlov above, though in my case it was mostly because it was at a point in time where…

> In principle generating dependencies from a notebook should be as easy as parsing the ast, finding all the import statements, and then using sys to lookup what package provided that module.

Well not really.

First, there is no link between a distribution package name (what you install with pip) and python package name (what you import).

e.g. The distribution package "foobar" can install the python package "baz". Well, it's even worst than that. There could be name space packages so multiple distribution package actually install parts of a python package. And there could be monkey patching.

Second, Python is not a static language. The import system is part of the interpretation of python code, and as such, is dynamic.

You have absolutely 0 guarantee that "import foo" on two different environments, even if they have the same version of package foo, will produce the same results. There could be an infinite amount of magic done in foo's __init__ that depend on other libraries being installed, etc.

Third, don't get me started on the actual version of these libraries.

Re: JupyterLab 3.0

#115
post #98

anyone still like classic notebooks better???

I do. The find and replace is better. You can do it across multiple cells. I don't like the drag and drop method of moving cells. Switching between notebooks is faster if you normally use multiple large notebooks at the same time. I am biased against JavaScript heavy UI. I just have had so many bad experiences with single page apps. The only problem I have with notebooks is the mathjax J's seems to cause the browser to hang on opening or running large notebooks. But it was the same in labs, but even worse with the tabs being handled by the UI instead of the browser. Switching back and forth between tabs and having to wait for them to render was annoying. I gave it a good go for a while recently, but the find and replace in classic notebooks is just so good I couldn't make the switch permanent.

Re: JupyterLab 3.0

#116
post #98

anyone still like classic notebooks better???

Yes! Every now and then I give JupyterLab a go but I keep going back to classic notebook. The only two extensions I need is Vim key bindings and Black formatting. I might checkout version 3 in a few months, but classic has a “feel” that just works for me. I’ve also tried the VSCode abs PyCharm notebooks. The dealbreaker is always how it displays the output of cells. It sucks compared to classic.

Re: JupyterLab 3.0

#117
post #112

Earlier quoted context omitted.

I use conda to do effectively the same thing. If my conda environment breaks and I can't roll it back, at least I can destroy it and start again. As an aside; it is really hard to explain why you should use anything but pip3 to people who only rarely need to interact with python.

Conda is pretty nice, and unless someone needs pypi, that's fair advice. And I agree, it's hard to explain not using pip3, so I just wouldn't. "For the best experience, pipx install neato-commando." And maybe link to the pipx website, in case someone actually clicks a link.

Conda works fine with Pip/PyPI.

Re: JupyterLab 3.0

#118
post #14

I don't write Python code for my work. Last weekend I came across an interesting Jupiter notebook and figured I'd give it a try on my work laptop. "It's probably as easy as brew install pip and then use that to load the other dependencies," I assumed. Over an hour later I had to give up. There was initially some kind of Python version conflict on my Mac. Eventually some version of JupyterLab was installed somewhere,…

Don't even try. Use docker, there are official pre-built images. It's easy:

  docker run -p 8888:8888 -v ~/Code/actual-project/:/home/jovyan jupyter/datascience-notebook
Note ~/Code/actual-project/ is a git repo or a mounted Google Drive folder. Moving from one machine to an other is pain-free.

[1] https://jupyter-docker-stacks.readthedocs.io/en/latest/using...

Re: JupyterLab 3.0

#119
post #64

Earlier quoted context omitted.

> I've been editing a tutorial one of my coworkers wrote that targets new Python users on Windows. From my findings, the grass is not greener. Maybe check the other other side (Linux) - I found the grass is greener there - at least for Python (and programming tools in general). I'm very comfortable on the command-line, and moving from a pure Linux environment to OS X & brew felt like a huge downgrade, followed by ran…

> followed by random annoyances that remind you you are using inferior, non-GNU utilities: Well, you can switch to another ls in 10 seconds by "brew install gnutools" or some such. Not to mention the same arguments could be made for FreeBSD, commercial unices, etc. Come to think of it, I've been using Unix (including Linux) for 25 years, and never even occured to me to expect "ls my_dir -l" to work.

What do you do if you want to add extra arguments when your cursor's at the end? Navigate back near (not to) the beginning? I usually just put them at the end, as almost every program I've used supports it. I add extra arguments after running commands constantly; after pressing up to get it back, you're at the end.

Re: JupyterLab 3.0

#120
post #48
post #44

Earlier quoted context omitted.

I've seen it crop up here and there. I've used it a few times and its really amazing how fast. Afaik it's a drop in replacement for conda using the same cli parse. Even has miniconda (micromamba).

Did you reply to the correct comment? I can't understand what you're referencing here.

I think they're talking about mamba and replied to the wrong thing.
Post reply on HN