anaconda python 连 impala (选择正确的anaconda版本, bug修复) & linux python3装 jupyter
Windows 上的安装
截至目前2019/2/20 不要选python3.7版本对应的anaconda, 因为在python3.7 "async" 变成了一个关键词, 和python访问impala的库impyla有冲突, 建议选python3.5对应的anaconda版本
import impala.dbapi
这段代码执行后可能报错: thriftpy.parser.exc.ThriftParserError: ThriftPy does not support generating module with path in protocol 'd'
参考这两个文章来解决:
https://blog.csdn.net/xianjie0318/article/details/55044343
https://blog.csdn.net/lhh08hasee/article/details/79283596
打开parser.py文件,找到488行。改为
if len(url_scheme) <= 1:
不建议在windows上使用 anaconda 连接 大数据的hive或impala, 坑太多.
在Linux上装/配置/启动python3的jupyter notebook:
# python is in /opt/python3.5
ln -s /opt/python3.5/bin/python3 /usr/bin/python3
echo "/opt/python3.5/lib" > /etc/ld.so.conf.d/python3.5.conf
ldconfig
ln -s /opt/python3.5/bin/pip /usr/bin/pip3
#add python3 type notebook
python3 -m pip install ipykernel
python3 -m ipykernel install --user
#start
python3 -m jupyter notebook --allow-root --ip=172.16.19.16