LoginSignup
3
0

More than 3 years have passed since last update.

WSL上で実行したPython(Jupyter notebook)がAbortedになる現象への対処法

Last updated at Posted at 2020-08-04

概要

WSL上でPython(Jupyter notebook)を実行した際にエラーが発生し正常に実行できない現象への対処方法。
起動直後ではなく、起動後かなり時間が経過した後に発生する傾向。

環境

  • Windows10
  • WSL (Ubuntu 18.04.2 LTS)

エラー内容

Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time
OverflowError: timestamp too large to convert to C _PyTime_t

Current thread 0x00007f0232c21080 (most recent call first):
Aborted (core dumped)

原因

uptimeがオーバーフローして負の範囲になってしまっている。
issue

$ uptime
 11:23:19 up -24855 days, -3:-14,  0 users,  load average: 0.52, 0.58, 0.59

対処方法

PC自体を再起動する。
もしくはPowershellを管理者モードで起動し、以下のコマンドを実行。WSLを再起動する。

PS XXXXXX> Get-Service LxssManager | Restart-Service

LxssManagerとは

Windows Subsystem for Linux 関連。Linuxでよく使用されるバイナリのフォーマットである ELF を Windows で動作させる機能に関するサービス。

参考

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0