jeertmans / manim-slides

Tool for live presentations using manim
https://manim-slides.eertmans.be
MIT License
443 stars 48 forks source link

[BUG] Install issue on Python3.12: Conflicting Dependencies #376

Closed Wizorx closed 4 weeks ago

Wizorx commented 7 months ago

Please explain the issue you're experiencing (with as much detail as possible):

Hello everyone! I've been using manim-slides for quite some time now but recently I changed PCs and when I tried to install manim-slides on the new one I just couldn't. Pipx seems to be working fine, as does manim. But When I try do install manim-slides, I get this error: "Cannot install manim-slides because these package versions have conflicting dependencies." I'm on Windows 11 using Python 3.12. Any help is welcome, thanks in advance!

2Sem título

jeertmans commented 7 months ago

Hello @Wizorx, thank you for reporting this issue!

Maybe PyOpenGL is not available on Python 3.12, or on Windows. Did you try not installing manimgl? So pipx install "manim-slides[magic,manim,,sphinx-directive,pyside6]" ?

Anyway, Python 3.12 is not well-supported, because of #293. I highly recommend installing Python 3.11 if you can :-)

Wizorx commented 7 months ago

That worked perfectly, thank you!

jeertmans commented 7 months ago

You're welcome!

Wizorx commented 7 months ago

Ok, nevermind. Something else came up.

image

jeertmans commented 7 months ago

What solution did you use above? So I can help you further :)

Wizorx commented 7 months ago

I used the pipx install "manim-slides[magic,manim,sphinx-directive,pyside6]" line.

jeertmans commented 7 months ago

Hello @Wizorx, I think this SO answer could probably help you: https://stackoverflow.com/a/77364602.

Can you try this out and tell me if that solve your issue? Of course, one of the solutions is to downgrade to Python 3.11.

Wizorx commented 7 months ago

Sorry for the delayed response, but it seems virutalenv won't run properly, when I try to run any commands, my cmd responds with something along the lines of "virtualenv is not an recognized command". I guess I'm better off downgrading to python 3.11. The thing is: how do I do that?

jeertmans commented 7 months ago

Sorry for the delayed response, but it seems virutalenv won't run properly, when I try to run any commands, my cmd responds with something along the lines of "virtualenv is not an recognized command".

On Windows, Linux or macOS, you need to make sure the commands are listed in one of the directories listed in the environment variable PATH. E.g., here is how you do it on Windows.

By default, this is very likely that the program installed with Python's pip are not placed in a directory that is listed in PATH. You usually get a warning about that at the end of the installation procedure. See:

path

Also, depending on your OS (Windows, Ubuntu, macOS, ...), the name of the Python executable can be different. For example, on Windows, Python is not python, but rather py, py3 or py3.11 for Python 3.11. You have to try whether its py or py3 in the terminal.

If you have multiple Python 3.x versions installed, you can use py3 --version to know which version was assigned the py3 alias. You can always use the full version name (e.g., py3.11) to specify a Python version (if installed, of course).

Then, virtualenv command not found probably means you did not install it. Either install it with py3 -m pip install virtualenv, or directly use Python's own virtualenv manager: py3 -m venv my_venv.

I guess I'm better off downgrading to python 3.11. The thing is: how do I do that?

Actually, there is no easy way for downgrading Python. You can just install another Python version on your computer. If you do not need Python 3.12 anymore, I suggest you to first uninstall it. Then, install Python 3.11 from the official website: https://www.python.org/downloads/.

Wizorx commented 6 months ago

Ok, so it seemed I had both 3.12 and 3.11 installed. I uninstalled both and reinstalled 3.11 just to be sure, but then it broke manimce. VSCode won't recognize it, choco won't uninstall it, nor will it force a reinstall. I deleted all files and folders related to choco, scoop and pip, removed their references in PATH and tried to install them all again, along with python 3.11, but no dice. What can I do now?

edit: when trying to install manimce through choco, i get this at the very end ` Failures

jeertmans commented 6 months ago

I am sorry to hear that you have troubles installing Manim and Manim Slides :/

Could you share the full error trace back? There should be important information in it.

Regardless, I recommend you post you question on Manim’s Reddit, Discord or GitHub issues :-)

Wizorx commented 6 months ago

Ok, for some reason when I ran choco install manimce without installing python first, it worked, but with two issues, first one is that manim slides, for some reason, uses manim 0.17.3 while the version I have installed is 0.18.0, which I don't understand. The second one is I've manage to render the Example scene successfully but I couldn't render a file I had lying around. I got this output for my file:

manim-slides Example
Usage: manim-slides present [OPTIONS] [SCENES]...

Error: 30 validation errors for PresentationConfig
slides.0.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 1, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.0.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 1, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.1.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 2, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.1.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 2, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.2.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 3, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.2.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 3, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.3.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 4, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.3.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 4, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.4.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 5, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.4.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 5, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.5.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 6, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.5.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 6, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.6.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 7, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.6.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 7, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.7.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 8, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.7.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 8, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.8.file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 9, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.8.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_... 9, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.9.file
  Field required [type=missing, input_value={'type': 'slide', 'start_...10, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.9.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_...10, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.10.file
  Field required [type=missing, input_value={'type': 'slide', 'start_...11, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.10.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_...11, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.11.file
  Field required [type=missing, input_value={'type': 'slide', 'start_...12, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.11.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_...12, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.12.file
  Field required [type=missing, input_value={'type': 'slide', 'start_...13, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.12.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_...13, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.13.file
  Field required [type=missing, input_value={'type': 'slide', 'start_...14, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.13.rev_file
  Field required [type=missing, input_value={'type': 'slide', 'start_...14, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.14.file
  Field required [type=missing, input_value={'type': 'last', 'start_a...15, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
slides.14.rev_file
  Field required [type=missing, input_value={'type': 'last', 'start_a...15, 'terminated': False}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
jeertmans commented 6 months ago

Hey @Wizorx, sorry for the delay!

The above error is likely caused by outdated slides, that were generated with an old version of Manim Slides. When using manim slides ..., it tries to parse the slides' config but fails because it does not match the expected config format.

The easiest would be to delete the slides/ folder, and re-render the slides with: manim-slides render <usual manim-render arguments>.

jeertmans commented 4 weeks ago

Closing, as this should be solved now (thanks to work on #465).