Matplotlib created a temporary config/cache directory at C:\Users\Elegent\AppData\Local\Temp\matplotlib-zx380bwq because the default path (C:\Users\Elegent.matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing. Traceback (most recent call last): File "D:\pythonProject\AppleStock\ananly2.py", line 24, in <module> candlestick_ochl(ax, df[["Open", "Close", "High", "Low"]].values, width=0.5, colorup="green", colordown="red") File "D:\pythonProject\venv\lib\site-packages\mplfinance\original_flavor.py", line 195, in candlestick_ochl return _candlestick(ax, quotes, width=width, colorup=colorup, File "D:\pythonProject\venv\lib\site-packages\mplfinance\original_flavor.py", line 281, in _candlestick t, open, close, high, low = q[:5] ValueError: not enough values to unpack (expected 5, got 4)
时间: 2023-07-05 09:26:24 浏览: 51
这个错误似乎是你的代码中使用了一个函数 `candlestick_ochl`,但是该函数的参数缺少了一些必要的值,导致无法正确执行。具体来说,该函数需要一个包含5个值的列表,但是你只提供了4个。你需要检查你的代码并确保提供了正确数量的参数。同时,你也可以尝试设置 MPLCONFIGDIR 环境变量以解决 Matplotlib 报错的问题。
相关问题
/environment/miniconda3/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf/SimHei.ttf: No such file or directory
这个错误提示表明SimHei.ttf字体文件不存在于指定的目录中。可能是因为你没有正确地下载和安装该字体文件,或者是因为你的路径设置不正确。你可以按照以下步骤检查和解决该问题:
1. 确认你已经正确地下载了SimHei.ttf字体文件,并将其放置在指定的目录下。
2. 检查你的路径设置是否正确,特别是确认你的路径中是否包含了正确的用户名和文件夹名称。
3. 确认你已经正确地修改了matplotlibrc文件,并将SimHei字体添加到了font.sans-serif列表中。
4. 检查你的缓存文件是否已经被正确地删除。
5. 确认你已经正确地重新启动了jupyter,并且已经执行了_rebuild()函数来重新加载字体。
如果你仍然遇到问题,可以尝试重新安装matplotlib或者在matplotlib的官方文档中查找更多的解决方案。
Requirement already satisfied: matplotlib in c:\users\tangtang\appdata\local\programs\python\python35-32\lib\site-packages (3.0.3)
根据您提供的引用内容,您想知道关于"matplotlib"包的信息。根据和引用,通过使用命令"pip install --target=xxx matplotlib"或"pip install --target=I:\APP测试\frida\objection matplotlib"可以在指定的路径安装matplotlib包。根据引用,如果您已经安装了matplotlib包,则会显示"Requirement already satisfied"。根据引用中的路径,我们可以看到您安装的matplotlib版本为3.0.3,并且安装在"c:\users\tangtang\appdata\local\programs\python\python35-32\lib\site-packages"目录下。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)