itholic commented on code in PR #44745:
URL: https://github.com/apache/spark/pull/44745#discussion_r1452863818


##########
python/pyspark/sql/pandas/utils.py:
##########
@@ -27,7 +27,11 @@ def require_minimum_pandas_version() -> None:
     try:
         import pandas
 
-        have_pandas = True
+        if hasattr(pandas, "__version__"):
+            have_pandas = True
+        else:
+            have_pandas = False
+            raised_error = None

Review Comment:
   Oh,, but this is reproduced when I run it in PySpark shell:
   
   **No Pandas**
   ```
   ./bin/pyspark
   import pyspark.pandas
   # pyspark.errors.exceptions.base.PySparkImportError: [PACKAGE_NOT_INSTALLED] 
Pandas >= 1.4.4 must be installed; however, it was not found.
   ```
   
   **Old Pandas**
   ```
   ./bin/pyspark
   import pyspark.pandas
   # pyspark.errors.exceptions.base.PySparkImportError: 
[UNSUPPORTED_PACKAGE_VERSION] Pandas >= 1.4.4 must be installed; however, your 
version is 1.4.0.
   ```
   
   Maybe this is only my local issue? Did you happen to check if you tested 
after uninstalling Pandas?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to