Target audience: Programmers
Used tools: Jupiter Notebook
What’s the purpose: Installing Jupyter Notebook on Windows10
A few days ago, my colleague ask me to help in solving a problem with Jupiter and KNIME on sample CSV file from Internet.
I’m in process of learning a Python programming language and I agreed First of all i have to install Jupiter on Windows 10, where i have installed Python 3.8 before and used it for learning. The more easyier way of this is to install Anaconda – the packet of Python with Jupiter. There are open-source Anaconda Distribution in Internet
from
https://www.anaconda.com/distribution/
with Python 3.7 and 64-Bit Graphical Installer (462 MB) but I have to reject this variant as i already used 3.8 and decide to install only Jupiter.
This was a mistake leaded to waste of time !
From this url
http://technivore.org/posts/2016/02/27/windows-jupyter-three-ways.html
you can read about ‘Three Ways To Run Jupyter In Windows’. But when start pip install jupyter , the installation starts, download the necessary file but suddenly there’s a long list of error with the message at the end ‘The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted’.
Running command prompt as administrator also fails. Didn’t help
python3 -m pip install –upgrade pip
python3 -m pip install jupyter
too !!!
To resolve the problem have to make virtual environment – with PowerShell :
PS C:\> python -m venv juenv
Here juenv is the name of our virtual environment. And then not to use command pip install jupyter but
PS C:\> pip install jupyterlab
After that installation is OK but when try to start jupyter notebook, we receive another error :
File paths.py line 359, in win32_restrict_file_to_user import win32api ImportError: DLL load failed:
The specified procedure could not be found.
This ImportError Exception was resolved with copying 3 or 2 DLL files from from folder
C:\juenv\Lib\site-packages\pywin32_system32 to folder C:\juenv\Lib\site-packages\win32 (for Pyton 3.8 these files are 2)
pythoncom38.dll
pywintypes38.dll
Now, when try to start Jupyter, we receive new error – in file
C:\juenv\Lib\site-packages\tornado\platform\asyncio.py
The answer is in
https://stackoverflow.com/questions/58422817/jupyter-notebook-with-python-3-8-not implemented error
“Following on this issue through GitHub, it seems the problem is related to the tornado server that jupyter uses. For those that can’t wait for an official fix, I was able to get it working by editing the file tornado/platform/asyncio.py, by adding:
import sys
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
IMPORTANT : These rows have to be inserted before this row (at the first rows of the file) :
class BaseAsyncIOLoop(IOLoop):
After then, when we start Jupyter :
(juenv)PS C:\jupyter notebook
our current browser open new tab with url
localhost:8888/notebooks/juenv
Here is url for short guide "How to Install and Run Jupyter Python Notebook"
https://www.csestack.org/install-use-jupyter-notebook-python-example/

