admin管理员组文章数量:1122832
_tkinter.TclError: Can't find a usable init.tcl in the following directories: C:/Users/91953/AppData/Local/Programs/Python/Python313/lib/tcl8.6 C:/Users/91953/AppData/Local/Programs/Python/lib/tcl8.6 C:/Users/91953/AppData/Local/Programs/lib/tcl8.6 C:/Users/91953/AppData/Local/Programs/Python/library C:/Users/91953/AppData/Local/Programs/library C:/Users/91953/AppData/Local/Programs/tcl8.6.14/library C:/Users/91953/AppData/Local/tcl8.6.14/library
This probably means that Tcl wasn't installed properly.
Trying to plot a graph using this code:
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from collections import Counter
plt.style.use("fivethirtyeight")
y_trial =[10,20,30]
plt.bar(x_trial, y_trial, color= "#444444",label ="Trial")
plt.legend()
plt.title(" Total sales per region")
plt.xlabel("Region")
plt.ylabel("Sales")
plt.show()
Am I missing anything in the code or something else? PS: I tried using 3.9 and 3.13 version also tried re installing pylance also tried reinstalling all libraries.
本文标签: pythontrying to plot a graph using matplotlib but showing this errorStack Overflow
版权声明:本文标题:python - trying to plot a graph using matplotlib but showing this error - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736310447a1934380.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论