# Shell we remove py2 dependence in jupyter notebook?

**URL:** <https://discourse.jupyter.org/t/shell-we-remove-py2-dependence-in-jupyter-notebook/2258>\
**Category:** General\
**Tags:** community\
**Created:** [September 29, 2019, 3:48pm UTC](https://discourse.jupyter.org/t/shell-we-remove-py2-dependence-in-jupyter-notebook/2258 "2019-09-29T15:48:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![00Kai0](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/00kai0/32/1144_2.png) [@00Kai0](https://discourse.jupyter.org/u/00Kai0)\
**Post date:** [September 29, 2019, 3:48pm UTC](https://discourse.jupyter.org/t/shell-we-remove-py2-dependence-in-jupyter-notebook/2258/1 "2019-09-29T15:48:30Z")

</div>

I saw the new `setup.py` in notebook shows:

```python
    error = """
Notebook 6.0+ supports Python 3.5 and above.
When using Python 3.4 or earlier (including 2.7), please install Notebook 5.x.

Python {py} detected.
{pip}
""".format(py=sys.version_info, pip=pip_message )

```

So the new notebook just supports `py>=3.5`.

And I saw many codes like:

```python
try: #PY3
    from base64 import encodebytes
except ImportError: #PY2
    from base64 import encodestring as encodebytes

```

Is it time to remove them?🤨  
I wanne try to do this.😈
