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

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(...),最笨的方法

 

 

你可能感兴趣的:(tensorflow,Ubuntu,Pillow)