Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过 Happybase 将 Pyspark 与 Hbase 连接起来。但我在开始时收到此错误:
(pyenv) hduser@master:~$ python -c 'import happybase' (pyenv) hduser@master:~$ python -c connection = happybase.Connection("somehost") bash: 意外标记 `(' 附近的语法错误
首先,连接命令中存在语法错误。其次,如果您想在后续步骤中使用 happybase 库,您必须按照以下方式将整个脚本从 bash 运行到单个命令中,以便维护会话。
python -c "import happybase;connection = happybase.Connection('localhost')"
另一种选择是创建一个 python.py文件并从 bash 运行它。
.py