2022年7月7日木曜日

UNUNTU22.04LTSのリモートデスクトップ

とにかくよく動くし、Windowsとの相性が抜群。

お勧めです。まるでここにUBUNTUがあるがごとし。

matplotlib.pyplotとpyQt5とopencvに関するエラー

import os, cv2, itertools, csv
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

このような環境中、pltを使ったところで(ubuntu 22.04)

QObject::moveToThread: Current thread (0x561c4d10a240) is not the object's thread (0x561c4d65a110).
Cannot move to target thread (0x561c4d10a240)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/deeptitan/.local/lib/python3.10/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
Aborted (core dumped)

このような珍しいエラー。
どうやらmatplotlib.pyplotが使っているqtとopencvがぶつかっているみたいです。

対応方法は、
$ pip uninstall opencv-python
$ pip install opencv-python-headless
です。

ぶつかっているopencvのheadを無くせばいいわけです。


【本を出版しました】神経科学者と学ぶ深層学習超入門

神経科学者と学ぶ深層学習超入門 を 羊土社 から出版いたしました。 本書は、基生研で働く生命系研究者である渡辺の目線から執筆した深層学習の入門書です。 数式やプログラムに慣れない方に配慮しつつ、文章では伝えきれない部分には、手描きイラストを多数掲載し、理解しやすさを心がけました。...