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

Cannot find any way to install tensorflow<=2.15.0 #66517

Open
peter-fm opened this issue Apr 26, 2024 · 9 comments
Open

Cannot find any way to install tensorflow<=2.15.0 #66517

peter-fm opened this issue Apr 26, 2024 · 9 comments
Assignees
Labels
TF 2.15 For issues related to 2.15.x type:bug Bug

Comments

@peter-fm
Copy link

peter-fm commented Apr 26, 2024

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

2.15.0

Custom code

Yes

OS platform and distribution

Ubuntu 22.04.3

Mobile device

No response

Python version

3.11

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

I want to install tensorflow in python and also then serve a model in a rust application. Since the only c++ bindings are for 2.15.0 (I cannot find any other compiled versions without building from source...which I tried and failed to do), I have to install tensorflow 2.15.0. I tried installing tensorflow 2.15.1 and training a model but the c++ bindings complain the model was trained using a version later than the c++ bindings (which is true)...so I assume I have to install tensorflow 2.15.0 or lower:

pip install "tensorflow==2.15.0"
ERROR: Could not find a version that satisfies the requirement tensorflow==2.15.0 (from versions: 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow==2.15.0

or

pip install "tensorflow<=2.15.0"
ERROR: Could not find a version that satisfies the requirement tensorflow<=2.15.0 (from versions: 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow<=2.15.0

I then tried to install 2.15 from source but since I don't have 3 phds I cannot decipher the reasons why it fails (after taking 4 hours to download, unzip and then compile).

I'm at a total loss at what to do... if there was just a wheel available for some version below 2.15.1 or just more compiled c++ bindings available for something other than 2.15.0 then I could not be wasting my time.

The problem is even worse if I try and use and-cuda (but one thing at a time?).

Standalone code to reproduce the issue

pip install "tensorflow<=2.15.0"

Relevant log output

ERROR: Could not find a version that satisfies the requirement tensorflow<=2.15.0 (from versions: 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow<=2.15.0
@edwardyehuang
Copy link
Contributor

What is ur python version?

@peter-fm
Copy link
Author

3.11. I think I tried 3.10 at some point but it didn't seem to help.

@winsweba
Copy link

Please have you try to use python version 3.9 for the installing of the tensorflow

@Venkat6871 Venkat6871 added the TF 2.15 For issues related to 2.15.x label Apr 29, 2024
@Venkat6871
Copy link

Hi @peter-fm ,

I tried to run your code on colab using TF v2.15 with python version 3.10 and I am not faced any issue. Please find the gist here for reference.

Thank you!

@Venkat6871 Venkat6871 added the stat:awaiting response Status - Awaiting response from author label Apr 29, 2024
@peter-fm
Copy link
Author

peter-fm commented Apr 29, 2024

Thanks for verifying that it should be possible @Venkat6871. I think I'm getting a handle on it now. If I set up a brand new environment in docker and do pip install "tensorflow==2.15.0" it works. If I then try pip install "tensorflow[and-cuda]==2.15.0" it fails with:

ERROR: Could not find a version that satisfies the requirement tensorrt-libs==8.6.1; extra == "and-cuda" (from tensorflow[and-cuda]) (from versions: 9.0.0.post11.dev1, 9.0.0.post12.dev1, 9.0.1.post11.dev4, 9.0.1.post12.dev4, 9.1.0.post11.dev4, 9.1.0.post12.dev4, 9.2.0.post11.dev5, 9.2.0.post12.dev5, 9.3.0.post11.dev1, 9.3.0.post12.dev1)
ERROR: No matching distribution found for tensorrt-libs==8.6.1; extra == "and-cuda"

Then when I tried to reinstall just "tensorflow==2.15.0", i.e. without cuda it is at that point I get the error. So I'm guessing it's something to do with my pip cache or it might be because I also have rye installed which might be breaking pip in someway. But at least I can now install <=2.15.0!

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label Apr 29, 2024
@Venkat6871
Copy link

Venkat6871 commented Apr 30, 2024

Hi @peter-fm ,

  • That's good to listen it is working for you, and I tried to run your code on colab using TF v2.15[cuda] with python version 3.10 and facing same issue. i am adding gist for your reference.

Thank you!

@Venkat6871 Venkat6871 added the stat:awaiting response Status - Awaiting response from author label Apr 30, 2024
@peter-fm
Copy link
Author

Hi @Venkat6871, yeah it looks like you're getting the same error in your gist:

Collecting tensorrt==8.6.1.post1 (from tensorflow[and-cuda]==2.15.0)
  Downloading tensorrt-8.6.1.post1.tar.gz (18 kB)
  Preparing metadata (setup.py) ... done
Collecting tensorrt-bindings==8.6.1 (from tensorflow[and-cuda]==2.15.0)
  Downloading tensorrt_bindings-8.6.1-cp310-none-manylinux_2_17_x86_64.whl (979 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 979.4/979.4 kB 52.3 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of tensorflow[and-cuda] to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement tensorrt-libs==8.6.1; extra == "and-cuda" (from tensorflow[and-cuda]) (from versions: 9.0.0.post11.dev1, 9.0.0.post12.dev1, 9.0.1.post11.dev4, 9.0.1.post12.dev4, 9.1.0.post11.dev4, 9.1.0.post12.dev4, 9.2.0.post11.dev5, 9.2.0.post12.dev5, 9.3.0.post11.dev1, 9.3.0.post12.dev1)
ERROR: No matching distribution found for tensorrt-libs==8.6.1; extra == "and-cuda"

It turns out that your code works fine if you're not using a build tool since all the packages before tensorrt are all that are needed. But in my case my build tool won't let me install any of the packages because of that error. However, I found a work around. Since it works without tensorrt, if I delete my local cache and then install all the cuda packages in your gist, i.e.
"nvidia-cublas-cu12==12.2.5.6" "nvidia-cuda-cupti-cu12==12.2.142" "nvidia-cuda-nvcc-cu12==12.2.140" "nvidia-cuda-nvrtc-cu12==12.2.140" "nvidia-cuda-runtime-cu12==12.2.140" "nvidia-cudnn-cu12==8.9.4.25" "nvidia-cufft-cu12==11.0.8.103" "nvidia-curand-cu12==10.3.3.141" "nvidia-cusolver-cu12==11.5.2.141" "nvidia-cusparse-cu12==12.1.2.141" "nvidia-nccl-cu12==2.16.5" "nvidia-nvjitlink-cu12==12.2.140"
and ignore thetensorrt libraries, the gpu works perfectly ... it seems to even work with python 3.11.8 🥳

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label Apr 30, 2024
@Venkat6871
Copy link

Hi @peter-fm ,

  • That's great listen it is working for you. Could you please confirm if this issue is resolved for you ? Please feel free to close the issue if it is resolved ?

Thank you!

@Venkat6871 Venkat6871 added the stat:awaiting response Status - Awaiting response from author label May 2, 2024
@peter-fm
Copy link
Author

peter-fm commented May 4, 2024

I would say it isn't entirely resolved since it currently isn't possible to install tensorflow[and-cuda]<=2.15.0 without experiencing the ERROR: No matching distribution found for tensorrt-libs==8.6.1; extra == "and-cuda". For most people this error probably won't matter since you can still use tensorflow without it. But some build tools might not work with that error in place so it should probably be fixed. For example, does and-cuda really need to includetensorrt-libs==8.6.1 by default?

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TF 2.15 For issues related to 2.15.x type:bug Bug
Projects
None yet
Development

No branches or pull requests

4 participants