IPython notebook fails to open any notebook - ipython

I was using ipython notebook (packages in Anaconda-2.1.0 or Canopy-1.4.1) in "Windows Server 2008 R2 Enterprise" with browser (latest version of chrome or firefox). It was working perfectly.
Once another user has started ipython notebook in his account. At first, his ipython notebook was failed to run any notebook. The worst is that my ipython was also failed to open or create any notebook after restart the kernel. The windows popup a dialog of "Problem signature" with following information:
Problem Event Name: APPCRASH
Application Name: python.exe
Application Version: 0.0.0.0
Application Timestamp: 538f8ffc
Fault Module Name: oleshell874.dll
Fault Module Version: 8.7.4.0
Fault Module Timestamp: 54448aac
Exception Code: c0000005
Exception Offset: 0000000000004867
OS Version: 6.1.7600.2.0.0.274.10
Locale ID: 1033
Additional Information 1: a481
Additional Information 2: a481c64a34722f1c689be57b64ee6a54
Additional Information 3: 3393
Additional Information 4: 33936ce55b0e8b96f5dce6a43fae2e99
Even I reinstalled the Anaconda or Canopy and restarted the system, it won't help. I have tried to google the Fault Module (oleshell874.dll) but it shows no result.
Please help!

Thanks for your comment. I just tried to google "oleshell dll" and found this file is not related to ipython and windows. The ipython works again after I've renamed this file.

Related

Why has Jupyter notebook kernel stopped working after RStudio package installation

To date I have been using Jupyter Notebook to run R and sometimes Python code. I have also been using RStudio at times. Recently, while using RStudio, I was prompted to install some package (cannot exactly remember). At any rate, I installed this package. Dont know if only coincidence, but trying to run R in the notebook resulted in kernel not connecting. I found the same issue with Python, the Python kernel is also not connecting anymore.
Executing the below, I get;
(base) C:\WINDOWS\system32>jupyter kernelspec list
Available kernels:
ir C:\Users\Admin\AppData\Roaming\jupyter\kernels\ir
python3 C:\Users\Admin\anaconda3\share\jupyter\kernels\python3
How do I get Jupyter Notebook's kernels to work again.
Executing IRkernel::installspec() in R via Anaconda CMD prompt have resolved the issue. Note for others with this issue, you may be prompted to run install.packages(“rlang”) before.

After the latest update of VSCode, I can't run Jupyter notebooks anymore

After updating VSCode, I have been unable to run Jupyter notebooks anymore. I am using VSCode on a MacBook Pro Max M1 and am encountering the following error:
Failed to start the Kernel.
Jupyter server crashed. Unable to connect.
Error code from Jupyter: 1
usage: jupyter.py [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
[--paths] [--json] [--debug]
[subcommand]
Jupyter: Interactive Computing
positional arguments:
subcommand the subcommand to launch
options:
-h, --help show this help message and exit
--version show the versions of core jupyter packages and exit
--config-dir show Jupyter config dir
--data-dir show Jupyter data dir
--runtime-dir show Jupyter runtime dir
--paths show all Jupyter paths. Add --json for machine-readable
format.
--json output paths as machine-readable json
--debug output debug information about paths
Available subcommands: kernel kernelspec migrate run troubleshoot
Jupyter command jupyter-notebook not found.
View Jupyter log for further details.
Unfortunately, none of the steps I tried have worked.
I am using January 2023 (version 1.75) release and extesion versions are as follows:
Python v2023.2.0
Jupyter v2023.1.2010391206
Has anyone else faced this issue? I would greatly appreciate any suggestions or solutions.
Thank you!
I have tried a number of steps to resolve the issue, including:
Making sure that jupyter-notebook is running in the terminal
Installing Jupyter in new conda and Python virtual environments
Removing VSCode and its related directories completely and downloading it again
Trying the "Switch to Pre-Release Version" for both Jupyter and Python extensions in VSCode
Tried updating jupyter and notebook liberaries
Tried running VSCode with code --no-sandbox
solved downgrading to previous version (November 2022) then updating to latest version again. Running same Python and Jupyter version. Good luck
I ran into this too. I was able to work around it by switching the Jupyter extension to the pre-release version (which was a suggestion in a different question that I can't find anymore).

Cannot locate json connection file created by ipython kernel

I'm using ipython 4.1.2 (installed via Anaconda). I locate the profile location (which is the default)
ipython locate profile
/home/myname/.ipython/profile_default
ipython kernel runs fine, saying
To connect another client to this kernel, use:
--existing kernel-8664.json
However, when I look inside /home/myname/.ipython/profile_default/security, it is entirely empty.
What's the issue here?
Connection files now live in a different location, because they are a component of the Jupyter architecture, rather than an IPython specific thing. The exact location depends on your system, but you can find it by running:
jupyter --runtime-dir
Or in Python code, call:
jupyter_core.paths.jupyter_runtime_dir()

IPython notebook does not produce output

I have just installed IPython 2.0 (April 2014) through Anaconda (64 bit) on a brand new pc with windows 7 (64 bit), performed the updates suggested and installed some packages with "$ conda install ".
I am loading IPython notebook with firefox and chrome. they are not the default browsers, so I used the information in this answer: https://stackoverflow.com/a/15748692/2344958
When I run IPython Notebook, it presents the landing pages and open new or imported notebooks, but it does not produce any output for cells.
I have no clue.
The only thing I can see is that the web console reports "Empty string passed to getElementById()."
Console works fine.
Any suggestion?
I found a page describing exactly the problem I had.
here the page:
Getting output with IPython Notebook
I actually have Sophos, but I have no control over it, and the solution that works so far was to start IPython with:
ipython notebook --ip=localhost
It also works by editing the line in configuration file
c.NotebookApp.ip = 'localhost'

Enthought Canopy ipython configuration: bad interpreter No such file or directory

I'm trying to launch Enthought Canopy's ipython from a Terminal in Mac OS 10.8.3 using the following command:
/Applications/Canopy.app/appdata/canopy-1.0.0.1160.macosx-x86_64/Canopy.app/Contents/bin/ipython
but I'm receiving the following error:
/Applications/Canopy.app/appdata/canopy-1.0.0.1160.macosx-x86_64/Canopy.app/Contents/bin/ipython: /Library/Frameworks/Python.framework/Versions/7.1/Resources/Python.app/Content: bad interpreter: No such file or directory
This (7.1) framework was previously installed but was removed long ago, so I can't quite figure out where Canopy's IPython is getting this link from. I've checked my ./ipython/profile_default directory as well but this didn't help.
Any idea how I might be able to launch ipython from a Terminal?
Thanks!
Canopy uses virtual environments to setup a user environment which is isolated from the environment in which the app itself is running. This prevents any changes made to the environment, by the user, from crashing the application itself.
To run an IPython terminal, with access to any packages that you may have installed via the package manager, you should run IPython from the User environment -- ~/Library/Enthought/Canopy_64bit/User/bin/ipython