Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation instructions in pip.md to address PEP 668 compliance for Windows WSL2 with Ubuntu 24.04 or later. #2345

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gaikwadrahul8
Copy link
Contributor

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 enforces PEP 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 the externally-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:

1. sudo apt install python3-venv
2. python3 -m venv ~/tf
3. source ~/tf/bin/activate
4. python3 -m pip install tensorflow[and-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.

…nce for Windows WSL2 with Ubuntu 24.04 or later.
Copy link
Collaborator

@haifeng-jin haifeng-jin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
I don't have enough context on this.
Please let other reviewers review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants