The problem that the pyecharts package cannot be called in jupyter

The pyecharts package is divided into two major versions, v0.5.x and v1.x, and the new version is not backward compatible. I need to use the previous version.

[The method of installing the package with the pip command in Anaconda] jupyter:

!pip install package name

[The method of jupyter] plugin installation package in VSCode:

%pip install package name

But when running, [pyecharts] still has a calling problem, and then I changed the version of pyecharts, and found that an error was reported and the solution was to update pip, but pip was already the latest version of 22, and then I uninstalled pyecharts.

pip uninstall package name

Following is my solution:

  1. Open Anaconda Prompt
  2. conda create -n virtual environment name python=xx (xx is the specified version number of python)
  3. activate virtual environment name
  4. pip install pyecharts==0.5.11
  5. conda install nb_conda
  6. jupyter notebook

The above operations are all performed in Anaconda Prompt, and then the code is successfully output after running the code.

If you use pycharm, you will use the render function to generate an html file, and then the browser will access the result.

Leave a Comment

Your email address will not be published. Required fields are marked *