Databricks:CryptographyDeprecationWarning:Python 3.5 支持将在下一版本的密码学中删除
Databricks: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography
我使用的是 Databricks cluster 5.5 LTS 版本。最初,我将它与 Python 2 一起使用。但现在我已经从 Python 2 升级到 3,保持集群版本相同。我已经安装了 PGPy 库来对 python 中的 PGP 文件进行解密。但是,由于这次升级,scala 笔记本(在这次升级之前 运行 非常好)失败并出现以下错误:
org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 1.0 failed 4 times, most recent failure: Lost task 0.3 in stage 1.0 (TID 7, 10.139.64.4, executor 2): org.apache.spark.SparkException: Process List(/databricks/python/bin/pip, install, xlrd, --disable-pip-version-check) exited with code 1. /databricks/python3/lib/python3.5/site-packages/OpenSSL/_util.py:6: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
我该如何解决这个错误?
您有几个选择:
- 关闭警告(有多种方法)
import warnings
# Ignores only DeprecationWarningS (not recommended)
warnings.filterwarnings('ignore', category=DeprecationWarning)
# Ignores all WarningS (not recommended, worse than above)
export PYTHONWARNINGS='ignore'
- 升级Python3.5(首选)
- 将 PGPy 恢复到仍然支持 Python 3.5
的先前版本
最终,您 将 最终将 Python 升级到受支持的版本,实际上,Python 3.5 被认为已过时;它和 3.6 之间甚至有显着的变化。此外,这样做很重要,因为这涉及到 OpenSSL。让它过时是不明智的。
查看 warnings
模块 documentation 了解有关抑制它们的更多信息。
我使用的是 Databricks cluster 5.5 LTS 版本。最初,我将它与 Python 2 一起使用。但现在我已经从 Python 2 升级到 3,保持集群版本相同。我已经安装了 PGPy 库来对 python 中的 PGP 文件进行解密。但是,由于这次升级,scala 笔记本(在这次升级之前 运行 非常好)失败并出现以下错误:
org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 1.0 failed 4 times, most recent failure: Lost task 0.3 in stage 1.0 (TID 7, 10.139.64.4, executor 2): org.apache.spark.SparkException: Process List(/databricks/python/bin/pip, install, xlrd, --disable-pip-version-check) exited with code 1. /databricks/python3/lib/python3.5/site-packages/OpenSSL/_util.py:6: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
我该如何解决这个错误?
您有几个选择:
- 关闭警告(有多种方法)
import warnings
# Ignores only DeprecationWarningS (not recommended)
warnings.filterwarnings('ignore', category=DeprecationWarning)
# Ignores all WarningS (not recommended, worse than above)
export PYTHONWARNINGS='ignore'
- 升级Python3.5(首选)
- 将 PGPy 恢复到仍然支持 Python 3.5 的先前版本
最终,您 将 最终将 Python 升级到受支持的版本,实际上,Python 3.5 被认为已过时;它和 3.6 之间甚至有显着的变化。此外,这样做很重要,因为这涉及到 OpenSSL。让它过时是不明智的。
查看 warnings
模块 documentation 了解有关抑制它们的更多信息。