問題タブ [pythoninterpreter]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - JavaでPythonInterpreterを使用してPythonパッケージをインポートする
PythonInterpreter を使用して Java コード (Netbeans) で Python コードの関数を使用しようとしていますが、Python コードにインポートされたパッケージがない場合は正常に機能しましたが、パッケージがある私のコードでは "tweepy をインポートする必要があります。 " エラーが発生しました:
ジャバコード:
Python コード (python_code.py):
Java コード実行時のエラー:
どうすればtweepyをJavaにインポートできますか?? 私はすでにPythonでインストールしています
python - Python インタープリターがどのノートブックでも Zeppelin 0.8.0 で動作しないのはなぜですか?
私は単に入力しています:
しかし、ノートブックのいずれかで実行するたびに、次のエラーが表示され続けます。
java.lang.OutOfMemoryError: org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:379) の Java ヒープ スペース。 org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Client.recv_createInterpreter(RemoteInterpreterService.java:209) の org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$ の apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) Client.createInterpreter(RemoteInterpreterService.java:192) at org.apache.zeppelin.interpreter.remote.RemoteInterpreter$2.call(RemoteInterpreter.java:169) at org.apache.zeppelin.interpreter.remote.RemoteInterpreter$2.call(RemoteInterpreter. java:165) org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcess.org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:165) で callRemoteFunction(RemoteInterpreterProcess.java:135) org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:132) でorg.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:299) で org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:407) で org.apache.zeppelin.scheduler.Job .run(Job.java:188) at org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:307) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util .concurrent.FutureTask.run (未知のソース) java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (未知のソース) で java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(不明なソース) で java.util.concurrent.ThreadPoolExecutor.runWorker(不明なソース) で java.util.concurrent.ThreadPoolExecutor$Worker.run(不明なソース) で java.lang.Thread.run(不明なソース) )
Zeppelin のノートブックで Python を使用しようとしています。環境変数に Java パスと Python パスの両方を追加し、ライブラリ py4j もインストールしました。また、使用しているローカル ホストを Zeppelin-site.xml ファイルに追加しました。また、スタック オーバーフローの同様の問題に関するこのリンクを見つけ、その中のすべてを試して Java スペースのサイズを変更しましたが、それでも機能しませんでした。 http://apache-zeppelin-users-incubating-mailing-list.75479.x6.nabble.com/Can-not-configure-driver-memory-size-td1513.html
少しでも助けていただければ幸いです。