Jupyter Notebook на Anaconda - ошибка ядра "win32security" - PullRequest
0 голосов
/ 26 сентября 2019

После долгих хлопот и установки unistalling anconda я наконец-то зашел в тупик, пытаясь запустить ноутбук Jupyter из "Anaconda3 2019.07 64bit" с "Python 3.7" на "windows 8.1 Enterprise 64bit SP0"

Проблема заключается в следующем:

  • Блокнот jupyter работает нормально, без ошибок Kernal, при установке по умолчанию в базовом окружении.
  • при установке следующих пакетов, что-то вызывает обновление блокнота jupyter, что вызывает kernalошибки, появляющиеся при создании новой записной книжки python3! * Установлено:

пакетов:

  • conda install -c conda-forge awscli boto3
  • conda install shapely тензор потокаopencv

Это дамп ошибки ядра:

Traceback (most recent call last):
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\tornado\web.py", line 1699, in _execute
    result = await result
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
    type=mtype))
  File "C:\Users\sxxx\.conda\envs\logAna\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\tornado\gen.py", line 209, in wrapper
    yielded = next(result)
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\jupyter_client\manager.py", line 240, in start_kernel
    self.write_connection_file()
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
    kernel_name=self.kernel_name
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
    with secure_write(fname) as f:
  File "C:\Users\xxx\.conda\envs\logAna\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\jupyter_client\connect.py", line 100, in secure_write
    win32_restrict_file_to_user(fname)
  File "C:\Users\xxx\.conda\envs\logAna\lib\site-packages\jupyter_client\connect.py", line 61, in win32_restrict_file_to_user
    sd = win32security.GetFileSecurity(fname, win32security.DACL_SECURITY_INFORMATION)
pywintypes.error: (50, 'GetFileSecurity', 'The request is not supported.')

Я создал новую среду, устанавливающую все нужные мне пакеты, но не смог найти, как установить ту же версиюjupyter notebook в «базовой» среде, при условии, что в новой версии jupyter notebook есть ошибка.

Я относительно nи Python, и Anaconda, и они не получают особой радости от них в течение трех полных дней мучений, пробуя всевозможные способы решения проблемы!

Это дамп из фида терминалов при возникновении этой ошибки!:

(base) C:\WINDOWS\system32>activate test

(test) C:\WINDOWS\system32>jupyter lab
[I 15:50:55.678 LabApp] JupyterLab extension loaded from C:\Users\xxx\
.conda\envs\test\lib\site-packages\jupyterlab
[I 15:50:55.678 LabApp] JupyterLab application directory is C:\Users\xxx\.conda\envs\test\share\jupyter\lab
[I 15:50:55.682 LabApp] Serving notebooks from local directory: C:\WINDOWS\syste
m32
[I 15:50:55.682 LabApp] The Jupyter Notebook is running at:
[I 15:50:55.682 LabApp] http://localhost:8888/?token=e2f1c73d291f7e884d3c618eb43
83196c2d75484a0f88d96
[I 15:50:55.682 LabApp]  or http://127.0.0.1:8888/?token=e2f1c73d291f7e884d3c618
eb4383196c2d75484a0f88d96
[I 15:50:55.682 LabApp] Use Control-C to stop this server and shut down all kern
els (twice to skip confirmation).
[C 15:50:55.914 LabApp]

    To access the notebook, open this file in a browser:
        file://A-FILEDATA-COV-P/Profile/xxx/AppData/Roaming/jupyter/ru
ntime/nbserver-8544-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=e2f1c73d291f7e884d3c618eb4383196c2d75484a0f
88d96
     or http://127.0.0.1:8888/?token=e2f1c73d291f7e884d3c618eb4383196c2d75484a0f
88d96
[W 15:51:04.157 LabApp] Could not determine jupyterlab build status without node
js
[E 15:51:13.236 LabApp] Uncaught exception POST /api/sessions?1569509473167 (::1
)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri
='/api/sessions?1569509473167', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\we
b.py", line 1699, in _execute
        result = await result
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\notebook\s
ervices\sessions\handlers.py", line 72, in post
        type=mtype))
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 735, in run
        value = future.result()
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\notebook\s
ervices\sessions\sessionmanager.py", line 88, in create_session
        kernel_id = yield self.start_kernel_for_session(session_id, path, name,
type, kernel_name)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 735, in run
        value = future.result()
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\notebook\s
ervices\sessions\sessionmanager.py", line 101, in start_kernel_for_session
        self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_na
me)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 735, in run
        value = future.result()
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 209, in wrapper
        yielded = next(result)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\notebook\s
ervices\kernels\kernelmanager.py", line 168, in start_kernel
        super(MappingKernelManager, self).start_kernel(**kwargs)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\multikernelmanager.py", line 110, in start_kernel
        km.start_kernel(**kwargs)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\manager.py", line 240, in start_kernel
        self.write_connection_file()
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\connect.py", line 547, in write_connection_file
        kernel_name=self.kernel_name
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\connect.py", line 212, in write_connection_file
        with secure_write(fname) as f:
      File "C:\Users\xxx\.conda\envs\test\lib\contextlib.py", line 112
, in __enter__
        return next(self.gen)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\connect.py", line 100, in secure_write
        win32_restrict_file_to_user(fname)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\connect.py", line 61, in win32_restrict_file_to_user
        sd = win32security.GetFileSecurity(fname, win32security.DACL_SECURITY_IN
FORMATION)
    pywintypes.error: (50, 'GetFileSecurity', 'The request is not supported.')
[W 15:51:13.245 LabApp] Unhandled error
[E 15:51:13.247 LabApp] {
      "Host": "localhost:8888",
      "Connection": "keep-alive",
      "Content-Length": "97",
      "Authorization": "token e2f1c73d291f7e884d3c618eb4383196c2d75484a0f88d96",

      "Origin": "http://localhost:8888",
      "X-Xsrftoken": "2|e0797587|bfb0295d2cfd16737a016247e6e4c3bb|1569403253",
      "User-Agent": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36
 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36",
      "Content-Type": "application/json",
      "Accept": "*/*",
      "Referer": "http://localhost:8888/lab",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "en-US,en;q=0.9",
      "Cookie": "_xsrf=2|e0797587|bfb0295d2cfd16737a016247e6e4c3bb|1569403253; u
sername-localhost-8889=\"2|1:0|10:1569504770|23:username-localhost-8889|44:NGY0Y
jJmZTI2MDZiNGU1ZDk5MTNjYjY3MTcwYjdlMDM=|caa84e45c938a438e74fe746b2d337a2e50d7882
a22c70ec0f114d22aa337feb\"; username-localhost-8888=\"2|1:0|10:1569509473|23:use
rname-localhost-8888|44:MDFkMmNlYjcwYzgxNGY3M2JlYmFjYTA4OTE2MGMwNDI=|d3bdb147f2b
afff4d6e7528326a74e6b7d13199b6f63400e84e2c00af8337dbf\""
    }
[E 15:51:13.248 LabApp] 500 POST /api/sessions?1569509473167 (::1) 69.19ms refer
er=http://localhost:8888/lab
[E 15:51:38.978 LabApp] Uncaught exception POST /api/sessions?1569509497781 (::1
)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri
='/api/sessions?1569509497781', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\we
b.py", line 1699, in _execute
        result = await result
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\notebook\s
ervices\sessions\handlers.py", line 72, in post
        type=mtype))
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 735, in run
        value = future.result()
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\notebook\s
ervices\sessions\sessionmanager.py", line 88, in create_session
        kernel_id = yield self.start_kernel_for_session(session_id, path, name,
type, kernel_name)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 735, in run
        value = future.result()
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\notebook\s
ervices\sessions\sessionmanager.py", line 101, in start_kernel_for_session
        self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_na
me)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 735, in run
        value = future.result()
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\tornado\ge
n.py", line 209, in wrapper
        yielded = next(result)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\notebook\s
ervices\kernels\kernelmanager.py", line 168, in start_kernel
        super(MappingKernelManager, self).start_kernel(**kwargs)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\multikernelmanager.py", line 110, in start_kernel
        km.start_kernel(**kwargs)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\manager.py", line 240, in start_kernel
        self.write_connection_file()
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\connect.py", line 547, in write_connection_file
        kernel_name=self.kernel_name
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\connect.py", line 212, in write_connection_file
        with secure_write(fname) as f:
      File "C:\Users\xxx\.conda\envs\test\lib\contextlib.py", line 112
, in __enter__
        return next(self.gen)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\connect.py", line 100, in secure_write
        win32_restrict_file_to_user(fname)
      File "C:\Users\xxx\.conda\envs\test\lib\site-packages\jupyter_cl
ient\connect.py", line 61, in win32_restrict_file_to_user
        sd = win32security.GetFileSecurity(fname, win32security.DACL_SECURITY_IN
FORMATION)
    pywintypes.error: (50, 'GetFileSecurity', 'The request is not supported.')
[W 15:51:38.984 LabApp] Unhandled error
[E 15:51:38.985 LabApp] {
      "Host": "localhost:8888",
      "Connection": "keep-alive",
      "Content-Length": "97",
      "Pragma": "no-cache",
      "Cache-Control": "no-cache",
      "Authorization": "token e2f1c73d291f7e884d3c618eb4383196c2d75484a0f88d96",

      "Origin": "http://localhost:8888",
      "X-Xsrftoken": "2|e0797587|bfb0295d2cfd16737a016247e6e4c3bb|1569403253",
      "User-Agent": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36
 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36",
      "Content-Type": "application/json",
      "Accept": "*/*",
      "Referer": "http://localhost:8888/lab",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "en-US,en;q=0.9",
      "Cookie": "_xsrf=2|e0797587|bfb0295d2cfd16737a016247e6e4c3bb|1569403253; u
sername-localhost-8889=\"2|1:0|10:1569504770|23:username-localhost-8889|44:NGY0Y
jJmZTI2MDZiNGU1ZDk5MTNjYjY3MTcwYjdlMDM=|caa84e45c938a438e74fe746b2d337a2e50d7882
a22c70ec0f114d22aa337feb\"; username-localhost-8888=\"2|1:0|10:1569509486|23:use
rname-localhost-8888|44:OWMzYTU5MjgzZDQ0NDQ5Zjk3ZDZkYzUzNTE5MDYxMjQ=|fc18aa7b12f
dfb162c64a2236e57c93d1088d13b7ae52fd63a37ffd9e815de38\""
    }
[E 15:51:38.986 LabApp] 500 POST /api/sessions?1569509497781 (::1) 25.07ms refer
er=http://localhost:8888/lab
...