python 问题集锦

来源:互联网 发布:学武术软件 编辑:程序博客网 时间:2024/06/07 15:36
Question 1:   

TypeError: 'in <string>' requires string as left operand, not int

Answer : http://stackoverflow.com/questions/24831961/typeerror-in-string-requires-string-as-left-operand-not-int


Qustion 2:在windows 环境下操作hbase可能会出现异常(java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries


Answer :

结合异常不难发现HADOOP_HOME_DIR值为null,基本上可以判断是 HADOOP_HOME环境变量的问题,实际上本来就没有配置hadoop的环境变量,报错也是理所当然了。

配置windows环境变量需要有winutils.exe,有大神提供了一个windows下环境配置所需文件,可参考https://github.com/srccodes/hadoop-common-2.2.0-bin


Question 3: No Module named py4j

Answer : pip install py4j



0 0
原创粉丝点击