Update installation instructions in pip.md to address PEP 668 compliance for Windows WSL2 with Ubuntu 24.04 or later.#2345
Open
gaikwadrahul8 wants to merge 1 commit intotensorflow:masterfrom
Open
Conversation
…nce for Windows WSL2 with Ubuntu 24.04 or later.
haifeng-jin
reviewed
Dec 22, 2024
Collaborator
haifeng-jin
left a comment
There was a problem hiding this comment.
Thanks for the PR!
I don't have enough context on this.
Please let other reviewers review.
8bitmp3
reviewed
Dec 30, 2024
Contributor
8bitmp3
left a comment
There was a problem hiding this comment.
@MarkDaoust @markmcd PTAL thank you!
MarkDaoust
reviewed
Jan 9, 2025
|
|
||
| ```bash | ||
| # Windows WSL2 with Ubuntu 24.04 or later adheres to PEP 668, requiring users to manage their Python environments independently. | ||
| sudo apt install python3-venv |
Member
There was a problem hiding this comment.
Makes sense... I don't have a Windows box handy.. are we sure this install is necessary? isn't venv part of the base python installation?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, Team
This PR will addresse the issue of outdated installation instructions for Windows WSL2 on the TensorFlow Pip Installation Guide.
Problem :
The existing instructions do not account for the changes introduced in
Ubuntu 24.04which enforcesPEP 668. This specification treats Python environments as externally managed deprecating global installations of Python packages via pip.The command
python3 -m pip install tensorflow[and-cuda]no longer works on Ubuntu 24.04. User encounter theexternally-managed-environmenterror unless they create and use a virtual environment.The installation instructions have been updated to include steps for creating and using a virtual environment when working with TensorFlow on Ubuntu 24.04 or later. The steps ensure compatibility and compliance with PEP 668.
Updated Instructions :
For Ubuntu 24.04 in WSL2 the following steps are required to set up TensorFlow with CUDA:
For more information please refer this issue tensorflow/tensorflow#79370 (comment) and it will fix that issue tensorflow/tensorflow#79370
if you've any feedback or suggestions for these changes please feel free to let me know. Thank you.