Raspberry Pi No module named Plotly

Question:

I have installed plotly on the Raspberry Pi. The objective is connecting to a remote MySql database and plot interactive time-series plots (that would update as the new data arrives into the MySql database). But I am running into no module found even after installing it. Looks like the pip install plotly is installing the package for python 2.7 (below screenshot) but I am using 3.3 (latest). How do I install the package for latest Python version.

Screenshot shows, installation of the module and then importing this module into the Python script:
enter image description here

Asked By: Mainland

||

Answers:

There are multiple python versions on your machine, and the pip command seems to be pointing to python version 2.7. You can point pip to your desired python installation with the following command:

python3 -m pip install plotly

This will use the pip that is associated with python3.

Answered By: jkr

Not directly to your question. But since you are dealing with time-series data, you may consider Time Series DB instead of MySQL, and visualize the data with Grafana.

Answered By: Lin