12 ms·
JupyterLab 3.0
- jjcon 6y agoInteresting that they include mamba install instructions before conda. Is mamba taking off with the recent (and upcoming) license changes that anaconda made? I’m not familiar with mamba though I’ve had my eyes open for an alternative to anaconda (also seen poetry mentioned a few times here).
- losvedir 6y agoHmm, what is mamba? I thought I was at least sort of up to date with the various python dependency managers, but that one is new to me. Relatedly, I have a grand vision of having as part of my development environment a jupyter notebook always at hand, in which to explore data as necessary, whip up scripts, accumulate little helper functions, etc. Basically, any time I have that "hm, I wonder..." itch, I'd like to be able to quickly whip up a solution in my notebook. I'm a skilled developer in terms of larger systems, but have a weakness when it comes to very early stage "throwaway" scripts to answer ad-hoc questions. I spent a few days trying to set up jupyterlab in an "ideal" way, so that I could have easy access to python libraries within my notebook, and also a reproducible environment since I plan to push my working directory to GitHub and would like to sync across different machines. I got confused by virtualenv vs venv, and tried conda to install libraries, but ran into various problems. Oh, and part of it was trying to have nbdev (from the fastai folks) as part of this toolkit. Anyone have a setup like this that they use and want to share? Part of me wants to just throw in the towel and learn R and RStudio, since I've heard its ggplot is the best plotting library anyway.
- nxpnsv 6y agoMamba is a reimplementation of the conda package manager in C++. (quote from README at https://github.com/mamba-org/mamba https://github.com/mamba-org/mamba, linked to in original post)
- vlgnat 6y agoFunny, Python is too slow for a package manager and most people who can write fast C extensions have left the scene. So C++ is the natural choice.
- roseway4 6y ago> most people who can write fast C extensions have left the scene Care to elaborate?
- remram 6y agoNot sure if I agree with you but I was very surprised to find that their Python kernel is also implemented in C++: https://github.com/jupyter-xeus/xeus https://github.com/jupyter-xeus/xeus
- klelatti 6y agoHave you looked at any of the Jupyter Docker Stacks images? [1] I've built some personal Docker images based on these with quite a lot of additional features installed including Ruby, OpenCL and lots of additional Python and R packages and JupyterLab extensions. It's been a bit hit and miss - with extension incompatibilities being a bit of an issue. I sync directories on the host machine with the Docker image and so have the benefit of editing in a full text editor (for non-notebook scripts). I'm not a Python env expert so I've probably missed a few tricks but all seems to be working well now. Happy to help if you want to try this route and have any issues. Btw after using JupyterLab for over a year now I'm a huge fan. [1] https://jupyter-docker-stacks.readthedocs.io/en/latest/ https://jupyter-docker-stacks.readthedocs.io/en/latest/
- iamlucaswolf 6y agoI use a setup like this. Essentially, I use pyenv [1] to manage Python versions and Poetry [2] [2](https://python-poetry.org/ https://python-poetry.org/) for virtualenvs/dependencies. The workflow for creating a new project looks like this: 1. Create a project directory (e.g. 'myproject') and `cd` into it. 2. `git init` 3. Fixate the Python version for that project with the `pyenv local` command (e.g. `pyenv local 3.8.6`). This creates a `.python-version` file that you can put under source control. Within the `myproject` directory tree, `python` will now be automatically resolved to the specified version. Your system Python (in fact, any other Python versions you might have installed) remain untouched. 4. Create a new poetry project (`poetry init`). This creates a `pyproject.toml` which contains project metadata + dependencies and can also be checked into git. 5. Add dependencies with `poetry add`. Here, you could for instance add Jupyter Lab (`poetry add jupyterlab`). To access installed dependencies, such as the `jupyter lab` command, you can either execute one command in the virtualenv directly (`poetry run jupyter lab`) or spawn a shell (`poetry shell`). If you open a Jupyter Notebook that way, the packages installed in the virtualenv are directly available from within Jupyter Notebooks, without having to mess around with installing IPython kernels. I like this approach, because it gives you full flexibility, while being portable and easy to use. It gets you around having to deal with conda (which I found to be frustrating at times). Also, you're not tied to the Jupyter frontends, but could e.g. just install `ipykernel` and open notebooks in VSCode. [1](https://github.com/pyenv/pyenv/ https://github.com/pyenv/pyenv/) [2](https://python-poetry.org/ https://python-poetry.org/) Edit: Moved the links
- claytonjy 6y agoI do very similarly, except I avoid installing jupyter lab for each project, instead installing `ipykernel` as a dev dependency. I install jupyter lab system-wide with pipx [1], and for each project issue a command like pipenv run python -m ipykernel install --user --name=this_directory Then if I open Jupyter Lab I see "this_directory" as a listed kernel to create a notebook from. This allows me to manage Jupyter settings and plugins in one place rather than in each env, have multiple project's notebooks open in the same Jupyter Lab instance, etc. [1]https://pipxproject.github.io/pipx/ https://pipxproject.github.io/pipx/
- liuliu 6y agoI have an unconventional setup of Jupyterlab, Python dependencies, Swift (through PythonKit package) with Bazel. Surprisingly, the new `rules_python` and `pip_install` support works great at installing packages through pip. This ensures on any machine, I will have a consistent Python runtime (either downloaded or build from the source), as well as the pinned python dependencies when the repo checked out. It also helps because I have a Swift kernel that packaged inside the repo as well. One thing I haven't figured out is about Jupyterlab's extension system, which previously requires node.js for delivery. It seems 3.0 removed that requirement, so I am hopeful with some tuning I can deliver the plugins in consistent way as well.
- zhengyi13 6y agoNeat! I don't suppose you've got your BUILD and WORKSPACE up somewhere you wouldn't mind sharing?
- abdullahkhalids 6y agoOn linux, I install Anaconda and just launch JupyterLab from Anaconda Navigator. But you could just install conda and just `conda env export -n base` to export your environment.
- BadInformatics 6y agomamba is (nominally) a drop-in replacement for Conda's CLI and dependency resolver. I've been using it for a couple of months and it really does run an order of magnitude faster for anything that requires dependency resolution. You'll still want to keep ana/miniconda around, but it goes to show how some of Conda's performance woes are entirely self-inflicted.
- globuous 6y agoNice ! Native debugger :)
- linspace 6y agoYes, debugging notebooks is not the best experience so I'm glad there are improvements. I will have a look.
- sgillen 6y agoI was really excited to see the visual debugger there. I tried it myself, it was really easy to get it going. Unfortunately, using it briefly in the notebook I was using I found it pretty buggy, lots of glitches and big slowdowns in the UI. I would also really love to see the option to drop into an interpreter while debugging. Still, can't complain too much about an open source project, thanks to the team for all their hard work.
- pavlov 6y agoI 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, but it couldn't find any dependencies for the notebook. As a complete newbie to the Python ecosystem, I googled for instructions and found various environment managers, which then failed possibly because something is incompatible with Big Sur. More googling revealed instructions with complex CFLAGS environment setups to fix it, which didn't — and at that point it was very far from the supposed convenience of scripting languages anyway. I don't think it's Python's fault. Probably all the programming toolchains are this hard to a newbie! But it was a humbling experience after 34 years of programming, not being able to load a piece of sample code in a Sunday afternoon.
- yshvrdhn 6y agocan look into google colab to directly load the notebook. Link : https://colab.research.google.com/ https://colab.research.google.com/
- turtlebits 6y agoYeah I've had this issue in the past with Jupyter. Now I generally look for docker images when I want to check out something new.
- paozac 6y agoTrue. I like Python, but the ecosystem can be very confusing for a quick dive. It's easy to get lost between pyenv, virtualenv, pipenv, pip, pip3, easy_install and friends.
- fwip 6y agoVery true - further evidenced by the five or six different approaches your sibling comments are recommending.
- antpls 6y ago
- kbelder 6y agoI skimmed the page and didn't see any mention of sharing or collaborative use. That's the biggest obstacle I'm seeing with getting buy-in at work. I need to be able to let some users see the notebook in read-only mode, others should be able to run it but not edit it, others should have full access. Maybe there's a non-hacky way to do this and I'm missing it?
- greazy 6y agoI'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).
- jVinc 6y agoOur solution to this is just to publish notebooks to an internal gitlab repo. Easy to share read-only versions, it renders a bit different but looks close enough. You can then easily manage user access rights in gitlab and contributing back changes is easy with the jupyterlab git integration. For publishing interactive examples we use voila, which creates a dashboard version of the notebook for users.
- pm90 6y agohttps://github.com/nteract/commuter https://github.com/nteract/commuter
- tourdownunder 6y agojupyterhub addresses some of these concerns.
- hnews2 6y agoI've seen a few projects that have used the JupyterLab UI for other projects as a simple interface - it looks really neat and slick. I just wondered if anyone has any ideas how you go about this as I've been drawing a blank.
- klelatti 6y agoCould you share any examples of what you've seen?
- ahupp 6y agoThis one uses JupyterLab as a frontend for CadQueury, a porcedural CAD system. https://github.com/bernhard-42/jupyter-cadquery https://github.com/bernhard-42/jupyter-cadquery
- klelatti 6y agoThank you that's really interesting. I've been working on a (proprietary) project that uses JupyterLab as a front end - for actuarial / insurance calculations. Happy to share experiences even if I can't share the underlying code (which probably wouldn't be of interest anyway!).
- hnews2 6y agoI'm so sorry, I don't remember - I had a demo of an app about 6 months ago which went no where, but, the interface was amazing and they told me they used the Jupyter project's interface. I tried downloading the source and removing the majority of the bits, but, I just got absolutely nowhere and was hoping there was a library somewhere or a guide that would make this job much easier, however, I'm getting nowhere!
- klelatti 6y agoThanks. Do you remember what was amazing? I've been using a fairly vanilla JupyterLab setup as the basis for a (proprietary) project. I've found the docs generally OK for what I've been doing. To be honest one of the worst things about JupyterLab I've found is the number of interesting extensions that look great but turn out to be unmaintained or overlap with others. It can be really confusing!
- colincooke 6y agoOk this may be kind of stupid, but my primary reason for not switching over to jupyter lab (from notebooks) was the right-click menu wouldn't let me copy images (plotting outputs typically) from the in-line output. However I found out today that it has always been available if you hold shift...so if that was anyone's issue this is a great time to give JupyterLab another shot!
- infinite8s 6y agoThat was an explicit decision in the underlying UI toolkit, which supports overriding the context menu in a generic way, to move the browser's default context menu to Shift-Click.
- saeranv 6y agoUgh, that's a lot simpler than my solution. I found out (I think through SO) that if you select the 'Create New View for Output' option, you can copy and paste as normal.
- klelatti 6y agoJust to say a big thank you to all those who have worked on JupyterLab. It's by far my favourite notebook interface and I think gets the balance between a clean interface and powerful features just about right. I just wish that the cloud providers would adopt it as the basis for their products.
- pm90 6y agoIt’s not a basis for their products but this is something https://colab.research.google.com/notebooks/intro.ipynb#recent=true https://colab.research.google.com/notebooks/intro.ipynb#rece...
- ktpsns 6y agoJup, MS Colab is one of the many commercial Jupyter/IPython notebooks available. There are also Y-combinator startups like https://deepnote.com/ https://deepnote.com/ I hope that these closed source commercial platforms give back something to the open source community around Jupyter once they get out of the red numbers.
- klelatti 6y agoIndeed and they all use their own notebook interface which are (in my view) inferior or at least no better than JupyterLab. I get that they feel the need to add their own features (collaboration etc) to distinguish themselves but it would be so much better if they had settled on a single UI.
- Jugurtha 6y agoWe do use JupyterLab for the notebook experience on https://iko.ai https://iko.ai. I had a chat with one of the core members of the project using real-time-collaboration when they were trying iko.ai. We chatted on the notebook itself. What I explained was that in our experience of many years doing paid machine learning projects for large enterprise, we never thought to ourselves: "Darn, if only Jupyter[Lab] had better stylesheets, this project would go so much faster." It has never happened. When we started building our platform, we were not in the position of front-end devs trying to make a better notebook, we were in the position of a company with deliverables for yesterday, and we naturally started solving for actual problems doing machine learning for real clients, as opposed to finding windmills to fight. In our experience, projects are slow not for lack of better stylesheets or animations. Therefore, we ignored that and focused on removing frustrations we had in the real world: long-running notebook scheduling, automatic experiment tracking for parameters, metrics, models, and code. Model deployment and monitoring. Real-time editing. That's why I don't really follow news about "jupyter-killers". I kept an eye out of curiosity, but every time one pops out, they solved things that don't matter much, or claimed they solved hidden state until you read the article and found they're caching results or something like that.
- bobbylarrybobby 6y agoI don't understand why Jupyter notebooks are still in use as a writable format when there are editors like VSCode that can treat ordinary python files as notebooks. The Python extension can submit code blocks to the kernel and import and export Jupyter notebooks, but VSCode is also a real editor on top of that (debugging, git, vim mode, hover info, etc.). For distribution, as a read-only format (like PDF), notebooks are great. But why do people continue to do their work in one?
- kaba0 6y agoMaybe I misunderstand something, but I use jupyter for sage for example and the point of it is that graphical results can be shown there immediately. Some plots can be even made interactive.
- bobbylarrybobby 6y agoWhen running a Python kernel, VSCode splits the editor into two panes, the input .py file pane and the output ipython pane. The output pane supports interactive graphs just like Jupyter does.
- abdullahkhalids 6y ago1. That's still less intuitive for someone who wants to understand the relationship between the code and output. 2. Following from 1, notebooks are meant to be shared with output in place, so others can understand without executing code.
- Jugurtha 6y agoExactly. When you want to show results to a client, for example. >2. Following from 1, notebooks are meant to be shared with output in place, so others can understand without executing code. We wanted to let others execute the code without being overwhelmed by the code, but we also wanted our colleagues not to write an application or parametrize the notebook by adding metadata or tagging cells, so we added a feature named AppBooks[0]. We automatically detect parameters you want to expose, build a form on top of your notebook, and then serve a clean page. The user gets a page with a form with fields corresponding to your parameters, they just change the values and hit Run. The notebook runs with the new parameters and the client/stakeholder gets the result. This solves the problem of: "I have a notebook, how do I not only show my work, but allow domain experts to tinker and run this with specific values". Especially useful when the parameters are pretty domain specific (like instrumentation for nuclear power plants where the client wants to try the model on edge values). These runs are tracked in case you want to share a training AppBook where it produces a better model, for example. - https://iko.ai/docs/appbook https://iko.ai/docs/appbook
- DataCrayon 6y agoGreat news! I'd only just updated the Purple Please theme[1] for Jupyter Lab 2.0, will have to look at doing the same for Jupyter Lab 3.0. It looks like they've made some improvements to extension development too which is good to see. [1] https://datacrayon.com/posts/tools/jupyter/theme-purple-please-for-jupyter-lab/ https://datacrayon.com/posts/tools/jupyter/theme-purple-plea...
- ezekielchen 6y agoReally hope they can change their notebook editor to monaco.
- eggie5 6y agoanyone still like classic notebooks better???
- bash-j 6y agoI 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.
- laichzeit0 6y agoYes! 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.
- jtpx 6y agoThen you might be interested in a new project called JupyterLab Classic, an alternative JupyterLab distribution with the Classic Notebook look and feel: https://github.com/jtpio/jupyterlab-classic https://github.com/jtpio/jupyterlab-classic Once the vim and black extensions adopt the new extension distribution system, they should also be compatible with JupyterLab Classic.
- narush 6y agoI'm one of those extension developers that working on getting my extension working on JupyterLab 3.0 :-) I've been developing Mito (https://trymito.io https://trymito.io), a spreadsheet extension to JupyterLab that allows you to edit a spreadsheet in a notebook as if you're editing Excel. You edit the spreadsheet, and Python code gets generated that corresponds to your edits. Feedback on the above greatly appreciated. And congrats on the release :)
- ben509 6y agoI'll have to try that next time I'm struggling with pandas. One thing to look into is figuring out some logic of cancellation to clean up the generated code. Even if you just checked back one step it would mean less Foo_Bar['D'] = 0. I think saving the analyses in the home directory is defeating the purpose. One appeal of a notebook is that you can break all the steps out and show them to someone, add commentary, etc. I'd want to use it interactively to figure out how to get my data looking the way I want, and then show off how the analysis works by pulling out non-interactive Step widgets that visualize changes into their own cells. That said, I'm often doing stuff with numpy so I need the notebook to document exactly what the dimensions mean, why I did a "clever" thing, etc. Also, as long as "import mitosheet" is hitting your analytics APIs, it's going to set off alarm bells if we try to use it inside our VPN. The compliance people are not likely to look at what it's sending or why, they'll just ban it and move on.
- porker 6y agoLooks nice! Which spreadsheet/grid library have you used, as I've not found one performant enough once you get 1000+ rows?