Installing a new Kernel in Jupyter Notebook (Anaconda)


(base) C:\Users\ashish>conda create -n py_2716 python=2.7.16
WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only using the old .tar.bz2 file format because you have conda-build installed, and it is 3.18.3.  Update or remove conda-build to get smaller downloads and faster extractions.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

    environment location: C:\Users\ashish\AppData\Local\Continuum\anaconda3\envs\py_2716

    added or updated specs:
    - python=2.7.16


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2019.6.16          |           py27_0         154 KB
    pip-19.1.1                 |           py27_0         1.9 MB
    python-2.7.16              |       hcb6e200_0        19.4 MB
    setuptools-41.0.1          |           py27_0         665 KB
    sqlite-3.29.0              |       h0c8e037_0         898 KB
    vc-9                       |       h7299396_1           3 KB
    vs2008_runtime-9.00.30729.1|       hfaea7d5_1        1017 KB
    wheel-0.33.4               |           py27_0          57 KB
    wincertstore-0.2           |   py27hf04cefb_0          13 KB
    ------------------------------------------------------------
                                            Total:        24.0 MB

Proceed ([y] or [n])? y


Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate py_2716
#
# To deactivate an active environment, use
#
#     $ conda deactivate

*****************************************************************

(base) C:\Users\ashish>conda activate py_2716

(py_2716) C:\Users\ashish>pip install ipykernel
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.

Installing collected packages: six, enum34, decorator, ipython-genutils, traitlets, wcwidth, prompt-toolkit, scandir, pathlib2, pickleshare, win-unicode-console, pygments, backports.shutil-get-terminal-size, colorama, simplegeneric, ipython, pyzmq, python-dateutil, futures, singledispatch, backports-abc, tornado, jupyter-core, jupyter-client, ipykernel
Successfully installed backports-abc-0.5 backports.shutil-get-terminal-size-1.0.0 colorama-0.4.1 decorator-4.4.0 enum34-1.1.6 futures-3.3.0 ipykernel-4.10.0 ipython-5.8.0 ipython-genutils-0.2.0 jupyter-client-5.3.1 jupyter-core-4.5.0 pathlib2-2.3.4 pickleshare-0.7.5 prompt-toolkit-1.0.16 pygments-2.4.2 python-dateutil-2.8.0 pyzmq-18.0.2 scandir-1.10.0 simplegeneric-0.8.1 singledispatch-3.4.0.3 six-1.12.0 tornado-5.1.1 traitlets-4.3.2 wcwidth-0.1.7 win-unicode-console-0.5

***********************************************************************

(py_2716) C:\Users\ashish>python -m ipykernel install --name py_2716
Installed kernelspec py_2716 in C:\ProgramData\jupyter\kernels\py_2716


***********************************************************************

Now you can go to the Jupyter Notebook to change to the Python 2.7 kernel.

No comments:

Post a Comment