Update installation instructions in pip.md to address PEP 668 compliance for Windows WSL2 with Ubuntu 24.04 or later. #2345
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.04
which 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-environment
error 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.