Trying to make some math visualizations, and I hear Manim is the go-to for that.
Working in Jupyter. When I run:
from manim import *
I get:
---------------------------------------------------------------------------
ContextualVersionConflict Traceback (most recent call last)
Cell In[14], line 1
----> 1 from manim import *
File ~\anaconda3\lib\site-packages\manim\__init__.py:8
4 from __future__ import annotations
6 import pkg_resources
----> 8 __version__: str = pkg_resources.get_distribution(__name__).version
11 import sys
13 # isort: off
14
15 # Importing the config module should be the first thing we do, since other
16 # modules depend on the global config dict for initialization.
File ~\anaconda3\lib\site-packages\pkg_resources\__init__.py:478, in get_distribution(dist)
476 dist = Requirement.parse(dist)
477 if isinstance(dist, Requirement):
--> 478 dist = get_provider(dist)
479 if not isinstance(dist, Distribution):
480 raise TypeError("Expected string, Requirement, or Distribution", dist)
File ~\anaconda3\lib\site-packages\pkg_resources\__init__.py:354, in get_provider(moduleOrReq)
352 """Return an IResourceProvider for the named module or requirement"""
353 if isinstance(moduleOrReq, Requirement):
--> 354 return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
355 try:
356 module = sys.modules[moduleOrReq]
File ~\anaconda3\lib\site-packages\pkg_resources\__init__.py:909, in WorkingSet.require(self, *requirements)
900 def require(self, *requirements):
901 """Ensure that distributions matching `requirements` are activated
902
903 `requirements` must be a string or a (possibly-nested) sequence
(...)
907 included, even if they were already activated in this working set.
908 """
--> 909 needed = self.resolve(parse_requirements(requirements))
911 for dist in needed:
912 self.add(dist)
File ~\anaconda3\lib\site-packages\pkg_resources\__init__.py:800, in WorkingSet.resolve(self, requirements, env, installer, replace_conflicting, extras)
797 if dist not in req:
798 # Oops, the "best" so far conflicts with a dependency
799 dependent_req = required_by[req]
--> 800 raise VersionConflict(dist, req).with_context(dependent_req)
802 # push the new requirements onto the stack
803 new_requirements = dist.requires(req.extras)[::-1]
ContextualVersionConflict: (Pygments 2.11.2 (c:\users\nsdsm\anaconda3\lib\site-packages), Requirement.parse('pygments<3.0.0,>=2.13.0'), {'rich'})
-----------------------------------------------------------
Tried to fix by reinstalling "pygments" because ChatGPT recommended that as the fix. Didn't fix it.
!pip uninstall pygments -y
!pip install pygments