We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
显示图像是空白,鼠标在上面滚动一下 就会报错
报错日志如下:
环境: pipenv pyenv
pipenv
pyenv
Traceback (most recent call last): File "demo4.py", line 103, in <module> create_word_cloud(all_word) File "demo4.py", line 66, in create_word_cloud plt.show() File "/Users/huhongyun/PythonProjects/geekTimeDataAnalysisInAction/.venv/lib/python3.6/site-packages/matplotlib/pyplot.py", line 254, in show return _show(*args, **kw) File "/Users/huhongyun/PythonProjects/geekTimeDataAnalysisInAction/.venv/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 3266, in show cls.mainloop() File "/Users/huhongyun/PythonProjects/geekTimeDataAnalysisInAction/.venv/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 1039, in mainloop managers[0].window.mainloop() File "/Users/huhongyun/.pyenv/versions/3.6.7/lib/python3.6/tkinter/__init__.py", line 1283, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
The text was updated successfully, but these errors were encountered:
为了兼容 pyenv 环境下的代码兼容性问题:
我添加了如下代码
import matplotlib matplotlib.use('TkAgg')
Sorry, something went wrong.
解决方案 :(替换渲染引擎)
pip3 install PyQt5
backend
backend: Qt4Agg
echo "backend: Qt4Agg" >> ~/.matplotlib/matplotlibrc
或者
vim ~/.matplotlib/matplotlibrc
添加:
新的渲染图:
No branches or pull requests
报错日志如下:
错误日志
The text was updated successfully, but these errors were encountered: