smfswxj 发表于 2017-11-9 11:59 版本兼容问题,不支持Python3.6.3可以按照下面方法操作 spark不支持python3.6 |
einhep 发表于 2017-11-7 21:05 [root@elephant bin]# ./pyspark Python 3.6.3 (default, Nov 9 2017, 11:50:07) Type 'copyright', 'credits' or 'license' for more information IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help. [TerminalIPythonApp] WARNING | Unknown error in handling PYTHONSTARTUP file /opt/spark2/python/pyspark/shell.py: --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /usr/local/lib/python3.6/site-packages/IPython/core/shellapp.py in _exec_file(self, fname, shell_futures) 321 self.shell.user_ns, 322 shell_futures=shell_futures, --> 323 raise_exceptions=True) 324 finally: 325 sys.argv = save_argv /usr/local/lib/python3.6/site-packages/IPython/core/interactiveshell.py in safe_execfile(self, fname, exit_ignore, raise_exceptions, shell_futures, *where) 2489 py3compat.execfile( 2490 fname, glob, loc, -> 2491 self.compile if shell_futures else None) 2492 except SystemExit as status: 2493 # If the call was made with 0 or None exit status (sys.exit(0) /usr/local/lib/python3.6/site-packages/IPython/utils/py3compat.py in execfile(fname, glob, loc, compiler) 184 with open(fname, 'rb') as f: 185 compiler = compiler or compile --> 186 exec(compiler(f.read(), fname, 'exec'), glob, loc) 187 188 # Refactor print statements in doctests. /opt/spark2/python/pyspark/shell.py in <module>() 28 import py4j 29 ---> 30 import pyspark 31 from pyspark.context import SparkContext 32 from pyspark.sql import SparkSession, SQLContext /opt/spark2/python/pyspark/__init__.py in <module>() 42 43 from pyspark.conf import SparkConf ---> 44 from pyspark.context import SparkContext 45 from pyspark.rdd import RDD 46 from pyspark.files import SparkFiles /opt/spark2/python/pyspark/context.py in <module>() 38 PairDeserializer, AutoBatchedSerializer, NoOpSerializer 39 from pyspark.storagelevel import StorageLevel ---> 40 from pyspark.rdd import RDD, _load_from_socket, ignore_unicode_prefix 41 from pyspark.traceback_utils import CallSite, first_spark_call 42 from pyspark.status import StatusTracker /opt/spark2/python/pyspark/rdd.py in <module>() 51 from pyspark.shuffle import Aggregator, ExternalMerger, \ 52 get_used_memory, ExternalSorter, ExternalGroupBy ---> 53 from pyspark.traceback_utils import SCCallSiteSync 54 55 /opt/spark2/python/pyspark/traceback_utils.py in <module>() 21 22 ---> 23 CallSite = namedtuple("CallSite", "function file linenum") 24 25 /usr/local/lib/python3.6/collections/__init__.py in namedtuple(*args, **kwargs) 391 392 def namedtuple(*args, **kwargs): --> 393 cls = _old_namedtuple(*args, **kwargs) 394 return _hack_namedtuple(cls) 395 TypeError: namedtuple() missing 3 required keyword-only arguments: 'verbose', 'rename', and 'module' In [1]: |
einhep 发表于 2017-11-7 21:05 已经安装1.8的jdk依然问题存在 |
先确保版本兼容,里面显然识别的是Python2,似乎这个不好用,然后jdk支持的是jdk1.8,楼主用的是jdk1.7. 所以先解决这两个问题。建议存在一个版本的Python及安装jdk1.8.卸载1.7,然后在看后面的问题。 |
metastore看看它的权限,可以尝试删除,提前做好备份 |