我有1個WorkerNode火花HDInsight羣集。我需要在Pyspark Jupyter中使用scikit-neuralnetwork和vaderSentiment模塊。jupyter pyspark輸出:無模塊名sknn.mlp
安裝庫使用以下命令:
cd /usr/bin/anaconda/bin/
export PATH=/usr/bin/anaconda/bin:$PATH
conda update matplotlib
conda install Theano
pip install scikit-neuralnetwork
pip install vaderSentiment
接下來,我打開pyspark終端,我能夠成功導入模塊。下面的截圖。現在
,我打開Jupyter Pyspark筆記本:
我想補充,我能夠從Jupyter進口預裝模塊,如 「進口大熊貓」
安裝進入:
[email protected]:/usr/bin/anaconda/bin$ sudo find/-name "vaderSentiment"
/usr/bin/anaconda/lib/python2.7/site-packages/vaderSentiment
/usr/local/lib/python2.7/dist-packages/vaderSentiment
對於預安裝的模塊:
[email protected]:/usr/bin/anaconda/bin$ sudo find/-name "pandas"
/usr/bin/anaconda/pkgs/pandas-0.17.1-np19py27_0/lib/python2.7/site-packages/pandas
/usr/bin/anaconda/pkgs/pandas-0.16.2-np19py27_0/lib/python2.7/site-packages/pandas
/usr/bin/anaconda/pkgs/bokeh-0.9.0-np19py27_0/Examples/bokeh/compat/pandas
/usr/bin/anaconda/Examples/bokeh/compat/pandas
/usr/bin/anaconda/lib/python2.7/site-packages/pandas
sys.executable路徑在兩個Jupyter和終端相同。
print(sys.executable)
/usr/bin/anaconda/bin/python
任何幫助將不勝感激。
這對你有幫助嗎?請接受答案,如果它:) – aggFTW