Hello I am getting started with jupyter labs I plan to use it for computational chemistry, the problem I am having is I am unable to create a new notebook from the browser, there may be a simple fix but I am lost also I am unable to open notebooks I have created using vscode locally on my computer.
You really aren’t providing much information for anyone looking to help you troubleshoot these issues. For example, there are a lot of types of computers and a lot of ways to install Jupyter. The former you probably knew, but the latter sometimes isn’t appreciated by those getting started. And you don’t really provide much information about the specifics of what you are seeing? Are you able to open and run notebooks you already have?
As for opening notebooks you created locally. Is it just your machine and your Jupyter than cannot open them? This is easier for you to determine right now. In your browser go to here and click on the
launch binder badge. A Jupyter session will be spun up for you with a JupyterLab instance served from the MyBinder.org-backed Jupyter Hub. Drag a notebook you made using VScode locally from your computer onto the file navigation panel in JupyterLab. After it gets copied to the remote machine, double-click in JupyterLab the notebook that you uploaded to open it. It may wish to convert it if you made it with an old version of Jupyter and you can let it. If it opens and involved a conversion, then I would save it and download that new version back to your machine. Maybe then your machine will ultimately be able to open that? If the remote-served Jupyter session cannot open it, all is not lost, hopefully. Notebook files are really just json text, and you can open it in a text editor on the remote machine or locally and copy out the pieces you need. (This assumes what you have created and saved from VScode locally didn’t get truncated or something horrible like that.) It may take some re-editing of the pasted code to do. I’d start by doing a few cells and then saving and examining the new json compared to the json text that didn’t work, especially the top and bottom of the notebook. By doing this and saving a new version and looking at the json structure, you may see the issue with the notebooks you created locally using VScode and be able to more generally fix them.
Keep in mind the remote machine may not yet be able to run all the code in your notebook. You can use
%pip install <package> and/or
%conda install <package> in the notebook cells to install most of the necessary dependencies that may not yet be there if you do indeed want to run it. (If you have some more complex dependencies that may not get everything working yet but there are ways you most likely could get it working even remotely if that is something that would be worthwhile to pursue.)
In fact, one suggestion to solve your current local Jupyter dilemma is to rely on remote-backed machines. You can run a machine yourself on a cloud provider if you need more power than MyBinder.org provides. (There are other places that may provide you Jupyter-backed instances as well depending on your country and profession/affiliations that you may want to explore.) In a lot of ways this ends up allowing your work to be more reproducible because you have different environments set up or the details of how to set them up worked out and you won’t affect environments set up for one thing when you set them up for another.
I am using a windows computer, I have used various videos on youtube and step by step instructions on the jupyter website.
Also, i get this error when trying to open jupyter notebooks created in vscode in the jupyter browser: Unreadable Notebook: C:\Users\daust\Desktop\Learning-Python\Molsiipractice.ipynb NotJSONError(“Notebook does not appear to be JSON: ‘’…”)
I tried to upload a picture, but I can type “jupyter notebook” in anaconda and get the browser to open with my computer directory open, but the button next to the upload button, that I believe I am to use to create a new notebooks in the directory does not give me a drop-down option to open a new notebook.
I hope this helps thank you for trying to help, my background is chem and this is something I am trying to utilize in grad school.
I am assuming by that you mean you tried to open them in Jupyter sessions served via MyBindrer.org as I described above? If not, please try that way.
Assuming you already tried that, as I tried, to say if there is no conversion, then it seemed you altered the json in such a away as to mess it up, perhaps. In my first post, I suggested you how to get started fixing them. If you are lucky there is some same error you made and you can fix all of them once you determine that. In parallel with that effort…If there is a short notebook that you created in VScode that you can share, you can try posting it as a gist here or other snippet sharing service to pass it along. Maybe it will be obvious what is wrong to others here?