Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

Open
gaikwadrahul8 wants to merge 1 commit into tensorflow:master
base: master
Choose a base branch
Loading
from gaikwadrahul8:patch-2

Conversation

Copy link
Contributor

@gaikwadrahul8 gaikwadrahul8 commented Dec 19, 2024

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.

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.

gaikwadrahul8 reacted with thumbs up emoji
Copy link
Contributor

@8bitmp3 8bitmp3 left a comment

Choose a reason for hiding this comment

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

@MarkDaoust @markmcd PTAL thank you!

@@ -70,6 +70,10 @@ step-by-step instructions.
for CUDA in WSL.

```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
Copy link
Member

@MarkDaoust MarkDaoust Jan 9, 2025

Choose a reason for hiding this comment

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

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@MarkDaoust MarkDaoust MarkDaoust left review comments

@haifeng-jin haifeng-jin haifeng-jin left review comments

@8bitmp3 8bitmp3 8bitmp3 left review comments

At least 1 approving review is required to merge this pull request.

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /