python3.8 venv environment jupyter notebook

Information as of 20191124. I write so lightly that I die because I am sleepy. 20191227 Addendum It seems that there is a lot of demand for this article only

Up to startup confirmation and initial settings.

python install I'm using the py launcher, so I don't pass the path to python.

venv environment creation

Environment creation. Then activate. The console is git-bash

$ py -m venv hoge
$ . hoge/scripts/activate

Install jupyter under venv environment

Update pip and install jupyter.

(hoge)$ pip install -U pip
(hoge)$ pip install jupyter

Start jupyter, error

(hoge)$ jupyter notebook

I got a deadly error. The point is here.

raise NotImplementedError

Add to asyncio.py under tornado

Choose your favorite editor. You don't even have to do it from the console.

(hoge)$ cd lib/site-package/tornado/platform
(hoge)$ emacs asyncio.py

In the asyncio.py file, add the following when the package import is almost finished.

hoge/lib/site-package/tornado/acyncio.py


    import sys
    if sys.platform == 'win32':
        asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

Started normally

(hoge)$ jupyter notebook

Change default folder

It looks like hoge / lib / site-package / tornado / platform is the default folder.

(hoge)$ jupyter notebook --generate-config
>>> Writing default config to: ~\.jupyter\jupyter_notebook_config.py

Uncomment the following and pass any path.

~/.jupyter/jupyter_notebook_config.py


#c.NotebookApp.notebook_dir = ''

Specify the venv kernel

I tried printing properly. It's speculation, but it seems that root python is used by default.

Add the venv environment with ʻipython kernel install`.

(hoge)$ ipython kernel install --user --name=hoge

From the jupyter kernel menu Change kernel> hoge

the end

Maybe you can use it. Let's feel free to use it.

Supplement

Jupyter server Maybe I feel like setting up a server with jupyter or python

If you type tmux into git-bash and start the virtual environment and jupyter notebook from the tmux session, it will not be a problem as it is, so I corresponded there

Appearance settings

This is really good. Almost copy. (Memory is ambiguous)

(hoge)$ jt -t onedork -fs 105 -tfs 11 -nfs 115 -cellw 88% -lineh 120 -T -N -f inconsolata

reference

I was saved. I didn't know that the reference source would be notified if @ was added properly.

Jupyter setup system

@ k-serenade Change the initial directory of Jupyter Notebook @Gattaca Using venv with jupyter notebook StackOverFlow : Jupyter Notebook with Python 3.8 - NotImplementedError

Jupyter appearance system

@kazukiii Your Jupyter is not good @ knakajima3027 Customize Jupyter Notebook theme @koikoi_jam About the font of jupyter-themes

Recommended Posts

python3.8 venv environment jupyter notebook
3 Jupyter notebook (Python) tricks
venv: Python virtual environment management
python standard virtual environment venv
Setting up Jupyter Lab in a Python 3.9 venv environment
venv (Python)
Snippet settings for python jupyter notebook
Generate Jupyter notebook ".ipynb" in Python
[MEMO] [Development environment construction] Jupyter Notebook
Easy to use Jupyter notebook (Python3.5)
Jupyter Notebook memo
Introducing Jupyter Notebook
Python development environment for macOS using venv 2016
Memory leak in Python Jupyter Lab (Notebook)?
Build Jupyter Lab (Python) environment with Docker
Using venv in Windows + Docker environment [Python]
python environment settings
python windows environment
Environment construction (python)
Powerful Jupyter Notebook
Python3 + venv + VSCode + macOS development environment construction
Python --Environment construction
Linking python and JavaScript with jupyter notebook
Jupyter notebook password
Jupyter Notebook memo
Python environment construction
Jupyter Notebook 6.0.2 cannot be installed in the Python 2.7 environment created in Anaconda
python environment construction
Python environment preparation (venv first time use)
Analytical environment construction with Docker (jupyter notebook + PostgreSQL)
How to create a Python virtual environment (venv)
Try using conda virtual environment with Jupyter Notebook
[Venv] Create a python virtual environment on Ubuntu
Procedure for creating a Python quarantine environment (venv environment)
Use jupyter-lab installed in python virtual environment (venv)
Error running Jupyter Notebook in Anaconda virtual environment
[Python] Get environment variables
My python environment memo
Get started Jupyter Notebook
Unification of Python environment
python windows environment construction
homebrew python environment construction
Python development environment construction
python virtual environment Pipenv
Install Python Jupyter lab
About Python development environment
virtual environment in python
Python environment with docker-compose
python2.7 development environment construction
Create a Python environment
Development environment in Python
Python3, venv and Ansible
Mac environment construction Python
Virtual environment with Python 3.6
Python environment construction @ Win7
Python environment for projects
[Cloud103] # 3 Jupyter Notebook again
Convert jupyter notebook .ipynb files to python executable .py files
Python: Creating a virtual environment (venv), starting and stopping
Data analysis environment construction with Python (IPython notebook + Pandas)
Build a Python virtual environment using venv (Django + MySQL ①)