Cannot open Jupyter notebook in Windows 8.1 - anaconda

I had Anaconda installed on Windows 8.1 and Jupyter notebook was working just fine with Julia and Python. I tried to install R kernel, however, it resulted in an error that some dependencies are needed, so I installed "m2w64-zlib" library in Anaconda then I installed R using this command "conda install -c r r-essentials" and I needed to update anaconda, so I did. After finishing all installations and updates Jupyter doesn't work. It just opens for a second and then switches off without opening the notebook in my browser.

I dont write code in "R" but Anaconda provides a few steps on how to get "R" working. Follow the steps in this link, Hope it helps:
https://docs.continuum.io/anaconda/r_language

It works now fine.
I uninstalled ipython
conda uninstall ipython
then installed Jupyter.
conda install jupyter

Related

how to run debugger in anaconda jupyter lab notebook [duplicate]

I am using jupyter lab and trying to embedd the debugger in it.
Windows 10, 64 bit
Here are the steps I followed:
conda create --name ml python=3.8.2
conda activate ml
conda install xeus-python notebook jupyterlab -c conda-forge
jupyter labextension install #jupyterlab/debugger
Then I start jupyter lab and it opens in Google Chrome:
Though I get the debugger button in xpython notebook but I am not able to turn it on.
Here is the screenshot.
Can someone help how to turn on the debugger??
A kernel with support for debugging is required to be able to use the debugger. Currently xeus-python is such a kernel, but the default IPython kernel will support the debugger soon too.
It is generally recommended to create a new conda environment to install the dependencies:
conda create -n jupyterlab-debugger -c conda-forge xeus-python notebook jupyterlab
conda activate jupyterlab-debugger
If running an old version of JupyterLab (2.x) you will also need to install nodejs to install the extension manually (note that it comes-preinstalled since JupyterLab 3.x so you do not need to run the commands below if using up-to date JupyterLab):
conda install nodejs
jupyter labextension install #jupyterlab/debugger
I am suspecting that it may be to do with versioning issues or have not met the prerequisites. There are also no reported similar issues so it must be to do with your system.
Make sure you meet these
JupyterLab 2.0+
xeus-python 0.7.1+
notebook 6+
And also consider doing a fresh install of Anaconda. This fixes it in most cases.

Launching JupyterQ from Anaconda Navigator

I'm following Kx instructions on installing jupyterq, embedpy and kdb in Anaconda. This is where I want to get to - a Jupyter notebook where I enter q commands. However, when I launch Jupyter notebook from Anaconda Navigator, I'm only able to create a new Python 3 notebook.
How do I create a notebook which accepts q commands?
Checked so far:
I can launch q from ubuntu terminal, it's licensed
In Anaconda Navigator, base environment shows jupyterq, embedpy and kdb as installed
I see jupyterq_kernel.q and others in my ~/anaconda/q directory
EDIT: Meanwhile, I downloaded Jupyter kernel for kdb+ manually. Its install.sh apparently registered q kernel for Jupyter. I'm able to open a notebook with jupyter notebook from terminal.
The below is now redundant as the Conda package has been fixed, but is left for reference
You can follow the guide here http://www.enlistq.com/installing-kdb-jupyterq-and-embedpy-using-conda/ in order to add the kernel to Jupyter, it seems the package misses kernel.json
From the comments it appears this is or will be fixed, but given you've already installed everything, it is likely quicker to follow the relevant section of this tutorial (under "installing jupyterq")

Not able to get Python 2 environment in Jupyter Notebook after creating and activating in Anaconda Prompt

Working on my Windows machine, I installed Anaconda 3 and created a Python 2 environment in Anaconda Prompt using commands below:
conda create -n py2 python=2
activate py2
conda install numpy matplotlib pandas scikit-learn
However, when I run jupyter notebook in Anaconda Prompt, in the opened notebook, I checked Python version using this:
import sys
print('Python version is:', sys.version_info)
I found out it is Python 3 instead of Python 2...I wonder what's going on?
It turns out I need to install jupyter notebook like below in Anaconda Prompt as well, otherwise, the default Python 3 version notebook will be called.
conda install jupyter notebook
Now, if we launch jupyter notebook again, we'll get Python 2.
You may also find that you need to install the Notebook extensions which provides Conda environment and package access extension from within Jupyter Notebook. You can do that by running:
conda install nb_conda

ijavascript will not install

I have been trying to run Javascript from a Jupyter Notebook on Windows 10 but failed miserably. It seems I cannot install IJavascript to make it available.
All installation guides say to use Anaconda for IJavascript - so I did, but I CANNOT FIND IJAVASCRIPT anywhere within Anaconda, only the js packages, i searched everywhere there was a search bar available. So, because I am stubborn i tried the hard way:
Installed all javascript packages except mocha (which cannot be found) listed here:
https://anaconda.org/javascript/repo
then tried
npm install -g ijavascript
but keep getting this error:
c:\users\ryuuzako\anaconda3\scripts\node_modules\ijavascript\node_modules\nan\nan_json.h(89): error C2660: 'v8::JSON::P
arse': function does not take 2 arguments [C:\Users\ryuuzako\Anaconda3\Scripts\node_modules\ijavascript\node_modules\ze
romq\build\zmq.vcxproj]
"Javascript" type does not appear when creating a new file in Jupyter, my guess is because ijavascript is not installed..
ANY suggestion to make it work is greatly appreciated.
I can provide the whole npm log but it is humongous.
Feel free to assume i am a complete idiot who didn't work with node before.
I've just forked ijavascript and edited the documentation for the Windows installation section as shown below.
Windows
Install Python3 or the Anaconda3 Python distribution.
In the command line:
pip3 install --upgrade pip
pip3 install jupyter
npm install -g ijavascript
ijsinstall
If the ijinstall command is not recognized, you can execute it manually by navigating to your npm install directory and running the ijinstall batch file. If you do not know where your npm install is located, try looking for it in the default install location: C:\Users\USERNAME\AppData\Roaming\npm.
Then you can run jupyter notebook in your terminal to load Jupyter Notebook. When you create a new Jupyter Notebook, you should see the Javascript (Node) kernel available.
If using the Anaconda alternative to the standard Python distribution, it comes pre-installed with Jupyter Notebook. If using Anaconda, you can skip the pip3 install jupyter step.
This picture might also help, when it comes to the ijinstall part.
I struggled with this as well. After installing by running commands:
pip install jupyter
npm install -g ijavascript
You will need to update the environment variable named 'Path' in the 'System Variables' section.
In Windows 10, Python 3.10, the path to add looks like:
C:\Users\your-windows-user\AppData\Roaming\Python\Python310\Scripts
After changing the environment variable, you will need to re-start the computer for it to take effect.
Once this is done, run:
ijsinstall
in the command prompt and you should be good to go.
This also happeed to me.
First thing install anaconda after that(by default you have installed jupyter),
then search in your menu apps for anaconda prompt, then install ijavascript from anaconda prompt:
npm install -g ijavascript
ijsinstall
then run jupyter from anaconda prompt
jupyter notebook

Vpython empty scene in Jupyter notebook

I looked at this question, but it provides a Linux solution. I'm running Windows 7. I developed a working Vpython notebook in Jupyter on one machine (in my office). It runs Python 2 (Anaconda package), and it does everything I want it to do.
I have another Windows 7 machine in my classroom. It has Anaconda3, and when I try to run the same notebook file, I get a black, empty scene for the vpython code. Also, if I try to start a New notebook from the Home tab of Jupyter notebook, there is not a VPython selection in the classroom machine. On my office machine (with Anaconda, Python 2), there is a VPython notebook option in the New list of Home.
I have done conda update conda and conda update anaconda and pip install vpython --upgrade commands on both machines and get the same behavior.
I have tried creating a new notebook with vpython commands and get the same behavior.
Summary: VPython in a Jupyter notebook with Python 2 on Windows 7 works. VPython in a Jupyter notebook with Python 3 on Windows 7 fails.
Any reasonable solutions?

Resources