今天看到youzhouliu的一篇博文:『數據可視化』基於Python的數據可視化工具,想學習一下,結果第一步安裝就出了問題…
由於是初學,啥啥都不懂,直接在Python中用pip安裝,結果出錯:
>>>pip install pyecharts
SyntaxError:invalid syntax
各種谷歌之後,發現用cmd執行pip,結果還是出錯:
>pip install pyecharts
‘pip’不是內部或外部命令,也不是可運行的程序或批處理文件。
不懂,繼續谷歌,發現需要在python目錄下執行pip,依舊出錯:
D:\WinPython\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\Scripts>pip install pyecharts
Fatal error in launcher: Unable to create process using ‘’’’
查到Thorns的博客,說是解決方法是:python3 -m pip install --upgrade pip,反正不太懂,繼續試:
D:\WinPython\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\Scripts>python–m pip install –upgrade pip
‘python’不是內部或外部命令,也不是可運行的程序或批處理文件。
嗯,纔可能需要在Python目錄下執行,而不是scripts下,所以退回上層目錄,繼續試試:
D:\WinPython\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64>python –m pip install –upgrade pip
居然真的可以了:Successfully installedpip-9.0.1
現在嘗試安裝pyecharts:
D:\WinPython\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64>pip install pyecharts
‘pip’不是內部或外部命令,也不是可運行的程序或批處理文件。
嗯,修改目錄,繼續試:
D:\WinPython\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64\Scripts>pip install pyecharts
Fatal error in launcher: Unable to create process using ‘’’’
依舊失敗,猜想可能不是目錄的原因,上面嘗試過python3 -m pip install --upgrade pip,猜想在這裏是不是也需要pyhton,繼續嘗試:
D:\WinPython\WinPython-64bit-3.4.4.4Qt5\python-3.4.4.amd64>python –m pip install pyecharts
Successfully installed future-0.16.0 jupyter-echarts-pypkf-0.1.0 lml-0.0.2 pyecharts-0.4.1
嗯,終於成功了!!折騰死了,其實也不太清楚原因,先記錄一下,免得後面忘了。