0

I cannot run jupyter lab as it complains about module six. Module six is already installed with conda. I even tried to install with pip too, but it says it is already installed and doesn't do anything. So, what to do here?

jupyter lab
Traceback (most recent call last):
  File "c:\users\ilyas\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\ilyas\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\ilyas\Anaconda3\Scripts\jupyter-lab.EXE\__main__.py", line 5, in <module>
  File "c:\users\ilyas\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 11, in <module>
    from jupyter_core.application import JupyterApp, base_aliases
  File "c:\users\ilyas\anaconda3\lib\site-packages\jupyter_core\application.py", line 30, in <module>
    from traitlets.config.application import Application, catch_config_error
  File "c:\users\ilyas\anaconda3\lib\site-packages\traitlets\__init__.py", line 1, in <module>
    from .traitlets import *
  File "c:\users\ilyas\anaconda3\lib\site-packages\traitlets\traitlets.py", line 57, in <module>
    import six
ModuleNotFoundError: No module named 'six'

I tried to remove with conda, and then re-install but that also did not work:

conda remove six
RemoveError: This operation will remove conda without replacing it with
another version of conda.

Install with pip:

pip install six
Requirement already satisfied: six in c:\users\ilyas\anaconda3\lib\site-packages (1.12.0)

python -m pip install six
Requirement already satisfied: six in c:\users\ilyas\anaconda3\lib\site-packages (1.12.0)

Environment:

  • Windows 10
  • python 3.7
  • jupyter-lab 1.0.0a3
  • six 1.12.0
ilyas
  • 609
  • 9
  • 25

3 Answers3

0

you are installing six for Python 2, but trying to use it from Python 3.

install for Python 3 with:

python3 -m pip install six

Corey Goldberg
  • 59,062
  • 28
  • 129
  • 143
  • python3 -m pip install six 'python3' is not recognized as an internal or external command, operable program or batch file. – ilyas May 31 '19 at 15:07
  • As I said "six" is already there. Why do I even need to install again? And python3 is unrecognized, is this normal? – ilyas May 31 '19 at 15:08
  • you have it installed in a different interpreter than you are running – Corey Goldberg May 31 '19 at 15:45
0

Tried the following but still NOT solved:

I had to do this in the following error:

pip uninstall six

pip install six

Then I get the the ModuleNotFoundError: No module named 'jupyter_server' error.

So I install jupyter_server with conda, and now the jupyter lab is working.

conda install -c conda-forge jupyter_server

Even though the notebook is opening, I could not import packages. Checking the command prompt was showing the jupyterlab-manager was outdated. So, did the following:

jupyter labextension install @jupyter-widgets/jupyterlab-manager

Still, the notebook opens but cannot do anything with it.

ilyas
  • 609
  • 9
  • 25
0

few years late but I had the same problem. To add a little to what Corey was saying. I think you need to install it via Conda to use it in Conda (and hence Jupyter), i.e.

conda install six

M Dru
  • 3
  • 3