0
我無法從matplotlib.animation導入FuncAnimation。當我嘗試這樣做,我得到的錯誤:從matplotlib.animation導入FuncAnimation時發生錯誤
ValueError: insecure string pickle
我使用matplotlib 1.5.1,Python 2.7版,Mac OSX上10.11.3,在Jupyter筆記本。
我無法從matplotlib.animation導入FuncAnimation。當我嘗試這樣做,我得到的錯誤:從matplotlib.animation導入FuncAnimation時發生錯誤
ValueError: insecure string pickle
我使用matplotlib 1.5.1,Python 2.7版,Mac OSX上10.11.3,在Jupyter筆記本。
啊,我發現這個問題(爲我安裝):
brew install imagemagick
我挖成的錯誤蟒蛇是出...
$ python -c "import matplotlib.animation"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/matplotlib/animation.py", line 578, in <module>
class ImageMagickWriter(MovieWriter, ImageMagickBase):
File "/usr/local/lib/python2.7/site-packages/matplotlib/animation.py", line 74, in wrapper
if writerClass.isAvailable():
File "/usr/local/lib/python2.7/site-packages/matplotlib/animation.py", line 277, in isAvailable
creationflags=subprocess_creation_flags)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1334, in _execute_child
child_exception = pickle.loads(data)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1388, in loads
return Unpickler(file).load()
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 864, in load
dispatch[key](self)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 972, in load_string
raise ValueError, "insecure string pickle"
ValueError: insecure string pickle
$
,發現正在使用的ImageMagick。鑑於在這個線程的意見... https://github.com/matplotlib/matplotlib/issues/5314#issuecomment-225368342 ...關於丟失的依賴關係,我安裝ImageMagick和問題消失了。
'從matplotlib導入動畫' –
@ReblochonMasque得到了同樣的錯誤 –
當我運行'從matplotlib導入動畫'我仍然得到'ValueError:insecure string pickle' – rafaelcosman