python - 如何在 Python 2.7 中安装雪花连接器
问题描述
我正在尝试为 python 2.7.10 版安装雪花连接器。大多数说明适用于 Python 3.6 及更高版本。我需要获取所需的库才能使其工作。到目前为止,这是我使用的,但它现在正在工作。
sudo yum install libffi-devel
sudo pip install setuptools==40.8.0
sudo pip install snowflake-connector-python
sudo pip install snowflake-connector-python==1.7.9
sudo pip install ipaddress
sudo pip install cryptography==2.6.1 --no-cache-dir
sudo pip install azure_storage_common==1.4.0
sudo pip install azure_storage_blob==1.5.0
你可能会问我为什么使用 Python 2.7。这是因为我使用的是旧的 AWS EMR 4.7,它的 oozie 工作流程仅适用于 Python 2.7。
谢谢,大卫
解决方案
运行这个,你应该可以用 Python 2.7 运行雪花:
sudo yum install libffi-devel -y
sudo pip install setuptools==18.5
sudo pip install -r https://raw.githubusercontent.com/snowflakedb/snowflake-connector-python/v2.3.9/tested_requirements/requirements_36.reqs
sudo pip install snowflake-connector-python==1.7.9
sudo pip install ipaddress==1.0.23
sudo rm -rf /usr/local/lib64/python2.7/site-packages/cryptography*
sudo pip install cryptography==2.6.1 --no-cache-dir
sudo pip install azure_storage_common==1.4.0
sudo pip install azure_storage_blob==1.5.0
推荐阅读
- git - 如何处理 git flow 中未合并功能的未来工作?
- c - 在 C 中,为什么当幂设置为 1/2 时,幂函数返回 1?
- c++ - 对类构造函数 h 文件的未定义引用
- c# - C# Entity Framework Core:处理 LINQ 表达式失败
- ios - 每次移动 UISlider 时删除注释 - mapView, Swift
- pandas - 如何将每月数据填充到熊猫中的每周数据?
- webpack - 用 webpack 编译 mapbox-gl 需要很长时间
- excel - 用于 Excel 的 VBA 代码,用于根据内容复制和转置粘贴一系列单元格
- css - 缩放时在 Chrome 中呈现(舍入?)问题
- c++ - 在测试客户端项目中测试我的 DLL 时出错