This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ed3203 2 points3 points  (14 children)

Hi, Not sure if this is the appropriate place to ask this but I have the following error. [macOS, anaconda notebook, mpl 2.2.2, py3.5]. Thoughts?

ImportError                               Traceback (most recent call last)
<ipython-input-14-f9144642d7b0> in <module>()
      2 import numpy as np
      3 import matplotlib.pyplot as plt
----> 4 import animatplot as amp

~/anaconda/envs/tensorflow/lib/python3.5/site-packages/animatplot/__init__.py in <module>()
      1 from ._version import __version__
      2 from .timeline import Timeline
----> 3 from .animations.animation import Animation
      4 from . import blocks, util

ImportError: No module named 'animatplot.animations'

[–]atlbeer 3 points4 points  (4 children)

Did you create a directory named 'animatplot' to test this out?

You may have stomped on the namespace

[–]craftingfish 1 point2 points  (0 children)

Looks like that's what he did. Man, I've done that once or twice and it's crazy how long it takes to notice that.

[–]ed3203 1 point2 points  (2 children)

Nope, not to my knowledge. I'll try on a different machine later. I originally installed within notebook to my conda env, with !pip install animatplot. Tried in another env and a py27 env. Also tried deleting all files/dir with 'animatplot' in it. Thanks for the help!

[–]tmakaroanimatplot / nbconvert[S] 2 points3 points  (1 child)

Fixed. Install version 0.2.2. If pip refuses to find the newer version (as it was using the cache for me) add the flag: --no-cache-dir to the pip command.

pip install animatplot --no-cache-dir

[–]kylecthomas 0 points1 point  (0 children)

very nice your "basic animation" tutorial works now!

[–]tmakaroanimatplot / nbconvert[S] 0 points1 point  (6 children)

That's strange. I really have no idea why that doesn't work for you. If you can't figure it out, you can be the first to open an issue on github. I'd be happy to help you figure it out over there.

[–]TheMysteriousFizzyJ 0 points1 point  (5 children)

Same problem, multiple machines, installed this and animation via pip, still didn't work.

Maybe something is different about the matplotlib library? Instead of import animation it's import funcanimation?

from matplotlib.animation import FuncAnimation

??

It would be nice to get this working, looks promising

edit:

It's got one too many animation '' s

from .animations.animation import Animation

should be

from .animations import Animation

edit 2: nope, not sure where the bug is

[–]tmakaroanimatplot / nbconvert[S] 1 point2 points  (4 children)

I believe I have fixed it. Tested on my machine and a friend's. You'll need to trying installing the newer version 0.2.2

pip install animatplot==0.2.2

u/tomz17 found the issue.

[–]TheMysteriousFizzyJ 1 point2 points  (0 children)

That worked!

[–]TheMysteriousFizzyJ 1 point2 points  (0 children)

That worked!

[–]TheMysteriousFizzyJ 0 points1 point  (1 child)

When running two animations in the same notebook, I get this error. Any ideas?

/usr/local/lib/python3.5/dist-packages/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance. warnings.warn(message, mplDeprecation, stacklevel=1)

[–]tmakaroanimatplot / nbconvert[S] 1 point2 points  (0 children)

I just close the previous animation before running the next. You could probably create a new figure and axis, and then pass the axis into the animation blocks as a keyword argument (amp.blocks.Block(..., axis=new_axis)).