解决 NotImplementedError: fromstring() has been removed. Please call frombytes() instead.

来源:互联网 发布:mac前端开发工具 编辑:程序博客网 时间:2024/05/19 04:29

1. 可能Pillow版本不对,运行命令:

pip uninstall Pillow

pip install Pillow==2.9.0 

或者

wget https://pypi.python.org/packages/62/7d/a6decd77e926197621ca13f63e4f37333a462e1be18a8b5928b692f7ae24/Pillow-2.9.0.tar.gz#md5=46f1729ece27981d54ec543ad5b37d14

也可以离线下载完Pillow,然后运行:

 

pip install pillow-2.9.0.tar.gz

 

2. 以上方法如不行,将im = Image.fromstring(...) 改成 im = Image.frombytes(...),最笨的方法

 

 

阅读全文
0 0
原创粉丝点击