尽管已安装模块六,但未找到模块六

时间:2019-05-31 14:38:12

标签: python jupyter-lab six

我无法运行jupyter实验室,因为它抱怨模块6。模块六已经安装了conda。我什至也尝试使用pip进行安装,但是它说已经安装了,什么也没做。那么,在这里做什么?

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'

我试图用conda删除,然后重新安装,但那也没用:

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

使用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)

环境:

  • Windows 10
  • python 3.7
  • jupyter-lab 1.0.0a3
  • 六个1.12.0

2 个答案:

答案 0 :(得分:0)

您正在为Python 2安装six,但尝试从Python 3中使用它。

使用以下命令安装Python 3:

python3 -m pip install six

答案 1 :(得分:0)

尝试了以下操作,但仍未解决:

我必须执行以下错误操作:

pip uninstall six

pip install six

然后我收到ModuleNotFoundError: No module named 'jupyter_server'错误。

所以我在jupyter_server上安装了conda,现在jupyter实验室正在运行。

conda install -c conda-forge jupyter_server

即使笔记本正在打开,我也无法导入软件包。检查命令提示符显示jupyterlab-manager已过时。因此,请执行以下操作:

jupyter labextension install @jupyter-widgets/jupyterlab-manager

仍然打开笔记本,但无法执行任何操作。