Jupyter command line is not responsive - jupyter-notebook

The Jupyter command line is always really slow to execute a command.
Right now, however, I don't understand why it is not responsive at all.
I am trying to run this:
!jupyter contrib nbextension install --py nbzip
After pressing enter nothing happens.
If, instead, I execute it from a .ipynb file, I get the following error:
PermissionError: [Errno 13] Permission denied: '/usr/local/share'

Related

How to fix zsh: corrupt history file /home/mis/.zsh_history (Linux)

Whenever I open terminal I got his Warning!
[WARNING]: Console output during zsh initialization detected
When using Powerlevel10k with instant prompt, console output during zsh
initialization may indicate issues.
You can:
Recommended: Change ~/.zshrc so that it does not perform console I/O
after the instant prompt preamble. See the link below for details.
You will not see this error message again.
Zsh will start quickly and prompt will update smoothly.
Suppress this warning either by running p10k configure or by manually
defining the following parameter:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
You will not see this error message again.
Zsh will start quickly but prompt will jump down after initialization.
Disable instant prompt either by running p10k configure or by manually
defining the following parameter:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
* You will not see this error message again.
* Zsh will start slowly.
Do nothing.
You will see this error message every time you start zsh.
Zsh will start quickly but prompt will jump down after initialization.
console output produced during zsh initialization follows
zsh: corrupt history file /home/mis/.zsh_history
You can solve it by removing the package (purge) and reinstall it back.

When running script: "julia -i run/run_nf.jl", the error following error is displayed "Could not determine command"

When I input the command
"julia -i run/run_nf.jl" the error "could not determine command" is shown.
before the error is shown this is how my cd looks like:
After activating the project with the command "activate." The following text is displayed in purple color ""
Finally with the command "julia -i run/run_nf.jl" I run the script "run_nf.jl" that is located on the folder "run". However, instead of running the script the following error is displayed.
The instruction for running and installing the necessary pachages are described in detail here:
Instruction, which I am based to run my script
As #fredrikekre mentioned in the comments, you are trying to run a terminal command from the Julia REPL's PKG mode, which will not work. You have two options:
Run the command from inside the REPL's shell mode by first using the "delete" or "backspace" key to exit out of the Pkg mode (you will see the prompt change) and then typing in ; which switched the REPL to shell mode and then you can run that command.
Same as above in that you need to exit the Pkg mode by clicking the "delete" or "backspace" key on you computer, and then you can run (from the REPL) include("run/run_nf.jl") which will run the file (assuming that is the correct file path).
I will also make a PR to that package you linked above to update the docs to be more clear. Edit, link to PR: https://github.com/dynamicslab/NormalFormAE/pull/7

Trying to add image in Git add but keep getting the following message? I tried restarting/reloading git and closing VS Code but nothing worked

That is:
hashanp#DESKTOP-9E00J4S: ~/cats-cakes$ git add .
error: open("img/cake.jpg"): Permission denied
error: unable to index file img/cake.jpg
fatal: adding files failed
Trying to add image in Git add but keep getting the following message? I tried restarting/reloading git and closing VS Code but nothing worked.
That looks like a git bash session on Windows, or a WSL session.
If you can not easily identify the process which keeps an handle to that file, preventing another program (like git) to access it, I would:
reboot
restart my git bash or WSL2 session
try to add img/cake.jpg before opening any IDE.
Since it is an Ubuntu session, I would also try, for tesdting:
sudo chmod -R 755 img
That way, the folder img will be accessible.

Nothing shows up when i run Jupyter notebook

When i run jupyter notebook it just shows up blank
I checked Console for errors and it showed me this:
Console error message
This is the line that the above Error message is referring to:
Error message line
Here is the URL bar if you need it (this is what the URL bar shows when i launch Jupyter notebook):
URL
used
jupyter nbconvert --to script object_detection_tutorial.ipynb
to convert .ipynb to .txt, then copied the code to a .py file

Why can't I connect to local runtime? Following google's tutorial gives me syntax errors

I'm running a topic modeling project and I need to run it on a much larger dataset (a 2GB xml file). The file won't upload to google drive and I decided to just try to run the code on my machine so because I need to run it faster as well. I decided to install Jupyter on my machine and tried to understand how to use my GPU on my local runtime I found another source here, where they provide a tutorial from google on how to connect to the local runtime:
How to make Jupyter Notebook to run on GPU?
However, the very first line of code there gave me a syntax error!
!pip install jupyter_http_over_ws
jupyter serverextension enable --py jupyter_http_over_ws
File "<ipython-input-2-77e87048a5d2>", line 2
jupyter serverextension enable --py jupyter_http_over_ws
^
SyntaxError: invalid syntax
I don't understand python code that well and I just want this thing to work. I don't know how to fix these syntax errors. I tried to run the other lines of code as well but all of them have syntax errors. I tried pasting that code to my original colab file on google colab and on my local copy on jupyter and it won't work.
The first line can be run either on a terminal or in python shell.
However, the second shell is to be run on a terminal and for this, of course, you need to have jupyter installed in your local system.
$ jupyter serverextension enable --py jupyter_http_over_ws
I was having this problem myself and saw this question unanswered. The above did the trick for me !

Resources