Jupyter Notebook-属性错误:“模块”对象没有属性“ F_OK”

时间:2018-11-15 16:30:01

标签: python anaconda jupyter-notebook jupyter

每当我输入命令“ jupyter notebook”,它就会给我上面列出的属性错误。我正在通过Anaconda Prompt运行它。

提示窗口中的内容:

(base) C:\Users\jj891w>jupyter notebook
Traceback (most recent call last):
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\Scripts\jupyter-notebo
ok-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\jupy
ter_core\application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\trai
tlets\config\application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\trai
tlets\config\application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\note
book\notebookapp.py", line 1630, in initialize
    self.init_terminals()
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\note
book\notebookapp.py", line 1459, in init_terminals
    from .terminal import initialize
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\note
book\terminal\__init__.py", line 3, in <module>
    import terminado
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\term
inado\__init__.py", line 8, in <module>
    from .management import (TermManagerBase, SingleTermManager,
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\term
inado\management.py", line 25, in <module>
    from winpty import PtyProcess as PtyProcessUnicode
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\winp
ty\__init__.py", line 11, in <module>
    from .ptyprocess import PtyProcess
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\winp
ty\ptyprocess.py", line 17, in <module>
    from backports.shutil_which import which
  File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\back
ports\shutil_which.py", line 12, in <module>
    def backport_which(cmd, mode=os.F_OK | os.X_OK, path=None):
AttributeError: 'module' object has no attribute 'F_OK'

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。我通过降级Anaconda和Python来解决此问题。

conda install anaconda=5.2.0 python=3.6