簡體   English   中英

Matplotlib 給出此應用程序無法啟動,因為它無法在“”中找到或加載 ZE8801102A40AD89DDCFCFDCAEBF008D25Z 平台插件“xcb”

[英]Matplotlib gives This application failed to start because it could not find or load the Qt platform plugin “xcb” in “”

以下代碼給出錯誤: Matplotlib 給出此應用程序無法啟動,因為它無法在“”中找到或加載 ZE8801102A40AD89DDCFDCAEBF008D25Z 平台插件“xcb”。

import matplotlib.pyplot as plt
import numpy as np


# Create the vectors X and Y
x = np.array(range(100))
y = x ** 2

# Create the plot
plt.plot(x,y)

# Show the plot
plt.show()

解決方案是安裝 PyQt5 /EnvironmentDirectoryPath/pip3 install PyQt5

https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html#understanding-the-correct-version-to-install找到詳細信息

我還使用sudo apt-get install python-qt4在系統范圍內安裝了它,沒有任何不良影響。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM