做爲一個進軍python的新菜鳥,我遇到了一個問題,在Jupyter Notebook裏面我沒法使用pyecharts,因此須要安裝,我百度了一個經常使用方法,在win10下,管理員運行cmd,而後輸入:pip install pyecharts
運行以後發現安裝不了,出現如下錯誤:You are using pip version 10.0.1, however version 19.0.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.因此須要先輸入:javascript
python -m pip install --upgrade pip
安裝成功出現以下:java
Collecting pip Downloading https://files.pythonhosted.org/packages/d7/41/34dd96bd33958e52cb4da2f1bf0818e396514fd4f4725a79199564cd0c20/pip-19.0.2-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 4.8MB/s Installing collected packages: pip Found existing installation: pip 10.0.1 Uninstalling pip-10.0.1: Successfully uninstalled pip-10.0.1 Successfully installed pip-19.0.2
輸入:python
pip install pyecharts
安裝成功出現:echarts
Collecting pyecharts ... ... # 內容太多,省略部分安裝信息 Installing collected packages: future, lml, jupyter-echarts-pypkg, pillow, dukpy, macropy3, javascripthon, pyecharts-javascripthon, MarkupSafe, jinja2, pyecharts Running setup.py install for future ... done Running setup.py install for jupyter-echarts-pypkg ... done Running setup.py install for macropy3 ... done Running setup.py install for javascripthon ... done Successfully installed MarkupSafe-1.1.0 dukpy-0.2.2 future-0.17.1 javascripthon-0.10 jinja2-2.10 jupyter-echarts-pypkg-0.1.2 lml-0.0.2 macropy3-1.1.0b2 pillow-5.4.1 pyecharts-0.5.11 pyecharts-javascripthon-0.0.6
打開Jupter Notebook,查驗是否成功安裝,輸入:ide
from pyecharts import Geo
仍然出現錯誤:測試
ImportError Traceback (most recent call last) <ipython-input-2-e231aa7c500b> in <module>() ----> 1 import pyecharts ImportError: No module named 'pyecharts'
沒辦法,找了一圈,只能去找源路徑本身下載了,地址以下:.net
https://pypi.org/project/pyecharts/#files
這裏要感謝一個大神發的文章,裏面有連接,不過不是最新的,本文章更新至最新,下面是引用的大神的連接:https://blog.csdn.net/f823154...
下載獲得文件pyecharts-0.5.11-py2.py3-none-any.whl
可是我鬱悶了,文件放哪啊,怎麼打開啊?開始了尋找之旅。
根據一個大神的操做,連接是:https://blog.csdn.net/f823154...
地址放在:code
D:\Anaconda3\Lib\site-packages
運行Anaconda Prompt,而後再一次安裝升級pythonblog
(D:\Anaconda3) C:\Users\xxx>python -m pip install --upgrade pip
再次鍵入 :pip install pyecharts
安裝 pyecharts
OK這下在Jupyter Notebook就能夠引用pyecharts啦!!!ip