Fix setup.py handling of estimator nightly.

PiperOrigin-RevId: 337600381
Change-Id: I24ee3b6dd6c57effc189ef5fb5574e349b68aded
diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py
index 0dc0391..d68422c 100644
--- a/tensorflow/tools/pip_package/setup.py
+++ b/tensorflow/tools/pip_package/setup.py
@@ -108,7 +108,10 @@
     if 'tensorboard' in pkg:
       REQUIRED_PACKAGES[i] = 'tb-nightly ~= 2.4'
     elif 'tensorflow_estimator' in pkg:
-      REQUIRED_PACKAGES[i] = 'tf-estimator-nightly ~= 2.4.0'
+      # Note the .* part! TF Estimator nightly packages are not named in a way
+      # that makes `~=` syntax work so we use `==` and `.*` to pick the latest
+      # released nightly.
+      REQUIRED_PACKAGES[i] = 'tf-estimator-nightly == 2.4.0.*'
 
 
 # grpcio does not build correctly on big-endian machines due to lack of