Repository: huggingface/diffusers
Pull request: Update installation.md
# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

Fixes #5712.


## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/diffusers/blob/main/CONTRIBUTING.md)?
- [x] Did you read our [philosophy doc](https://github.com/huggingface/diffusers/blob/main/PHILOSOPHY.md) (important for complex PRs)?
- [x] Was this discussed/approved via a GitHub issue or the [forum](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63)? Please add a link to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/diffusers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/diffusers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @.

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Core library:

- Schedulers: @williamberman and @patrickvonplaten
- Pipelines:  @patrickvonplaten and @sayakpaul
- Training examples: @sayakpaul and @patrickvonplaten
- Docs: @stevhliu and @yiyixuxu
- JAX and MPS: @pcuenca
- Audio: @sanchit-gandhi
- General functionalities: @patrickvonplaten and @sayakpaul

Integrations:

- deepspeed: HF Trainer/Accelerate: @pacman100

HF projects:

- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- transformers: [different repo](https://github.com/huggingface/transformers)
- safetensors: [different repo](https://github.com/huggingface/safetensors)

-->


Problem statement:
pip install --upgrade diffusers[torch] fails with Python 3.12 on Windows 11
### Describe the bug

`pip install --upgrade diffusers[torch]`  with Python 3.12 results in a failed installation, with one the (many) errors being: 

`ERROR: Could not find a version that satisfies the requirement torch (from versions: none)`

Workaround: 
Use Python 3.11.

Note:
Writing this to hopefully save others from a day of head scratching.

### Reproduction

Run `pip install --upgrade diffusers[torch]` using Python 3.12

### Logs

_No response_

### System Info

Python 3.12.x

### Who can help?

_No response_

Hints from issue discussion:
Hi @sayakpaul @patrickvonplaten, I would like to try this issue. Thanks
@Bhavay-2001 feel free to give it try! thank you 
Hi @yiyixuxu since i am new to open source, could you please suggest how can I begin solving. Thanks
Probably could just put a small note in the Installation section of the README.

Something along the lines of "use Python 3.11 and below on Windows" 
Hi @canxerian, need to check with the maintainers if there is a possible solution to this or should we just add the note below.
We should really start to test `diffusers` more on Windows cc @DN6 
Hi @patrickvonplaten, please let me know how can I contribute to the issue. Thanks

This is not a problem with diffusers, pytorch it's not supported for python 3.12 on windows:

https://pytorch.org/get-started/locally/

`Currently, PyTorch on Windows only supports Python 3.8-3.11; Python 2.x is not supported.`


Hi @patrickvonplaten, as mentioned by @asomoza should we mention in the documentation file?
Thanks 
> Hi @patrickvonplaten, as mentioned by @asomoza should we mention in the documentation file? Thanks

@yiyixuxu @DN6 does anybody of you have time to double check how well `diffusers` is supported on Windows?

Commit message: Update installation.md

Patch to review:
diff --git a/docs/source/en/installation.md b/docs/source/en/installation.md
index 3bf1d46fd0c7..c1146570e668 100644
--- a/docs/source/en/installation.md
+++ b/docs/source/en/installation.md
@@ -41,6 +41,7 @@ You should also install 🤗 Transformers because 🤗 Diffusers relies on its m
 <pt>
 ```bash
 pip install diffusers["torch"] transformers
+Note - PyTorch doesn't support Python 3.12 on Windows. Please use Python 3.11 instead.
 ```
 </pt>
 <jax>


Code review comments:
diff_hunk: @@ -41,6 +41,7 @@ You should also install 🤗 Transformers because 🤗 Diffusers relies on its m
 <pt>
 ```bash
 pip install diffusers["torch"] transformers
+Note - PyTorch doesn't support Python 3.12 on Windows. Please use Python 3.11 instead.
path: docs/source/en/installation.md
text: @user1:
This should be placed outside of the code block and preferably before it :)

```suggestion
PyTorch only supports Python 3.8 - 3.11 on Windows.
```

@author:
Hi @user1, actually @user2 suggested to place it inside the the Pytorch framework placeholder. Should I place this before the Pytorch block?

@user1:
Sorry, what I meant is it should be outside of the `bash` code block but inside the `<pt>` one like this:

```md
<pt>

PyTorch only supports Python 3.8 - 3.11 on Windows.

<code snippet here>

</pt>
```