It turned out that a code error occurs in the latest version of TensorFlow when I try to proceed with learning with "Deep Learning starting with TensorFlow" (Impress Takuya Niimura = author). Considering that the same situation will occur in the future, I wanted to master the construction of a virtual environment, so I created an environment. This article is a memorandum.
-Create a virtual environment and install TensorFlow 1.4 -Use the created virtual environment with jupyter notebook
Install the library that will add the kernel to your base environment.
pip install environment_kernels
Next, create a new virtual environment. I also installed python, jupyter, and ipykernel.
conda create -n hoge python=3.6 jupyter ipykernel
conda info -e
$base * C:/Users/... #Active environment
$hoge C:/Users/...
Activate the virtual environment you created.
activate hoge
$(hoge) C:\Users\...> #Is displayed, OK
Create a config file for jupyter notebook.
jupyter notebook --generate-config
.jupyter / jupyter_notebook_config.py will be created, so add the following to an appropriate location.
c.NotebookApp.kernel_spec_manager_class = 'environment_kernels.EnvironmentKernelSpecManager'
c.EnvironmentKernelSpecManager.conda_env_dirs=['/home/User/Anaconda3/envs/']
In [], specify the folder where the virtual environment is saved.
Set the virtual environment in the kernel.
ipython kernel install --user --name=hoge
For the time being, the virtual environment can be used in this state. Launch jupyter notebook and it should be added to the kernel tab. After that, please like it as it is boiled or baked.
Using both Python 2.x and Python 3.x in IPython Notebook https://stackoverflow.com/questions/30492623/using-both-python-2-x-and-python-3-x-in-ipython-notebook
https://qiita.com/suzukihi724/items/b29f3fe9df96f7102ec9
https://kazusa-pg.com/jupyter-notebook-use-virtual-env-kernel/
https://qiita.com/yoppe/items/38005f415a5b8b884c7d
https://qiita.com/tomochiii/items/8b937f15c79a0c3eae0e
https://nodaki.hatenablog.com/entry/2019/04/03/223102