python 2.7 – ImportError: No module named plotly.plotly in LinuxMint17.3

python 2.7 – ImportError: No module named plotly.plotly in LinuxMint17.3

You will need to install them first.

pip install plotly
pip install cufflinks

In my case I wanted to use in a Jupyter Notebook in Windows 10 but was getting the same error

ModuleNotFoundError Traceback (most recent call last)
in
—-> 1 import plotly.express as px

ModuleNotFoundError: No module named plotly

Jupyter

Considering you can also install Anaconda in Linux Mint and these came with Anaconda (in my case), if you decide to go with Anaconda youll have at least two options to install plotly

  1. Anaconda Prompt

  2. Anaconda Navigator

Once installed, youll be able to use it without any problem

Using


1. Anaconda Prompt

Open Anaconda Prompt

W10

Run the following command

conda install -c plotly plotly=4.8.1

Install


2. Anaconda Navigator

Open Anaconda Navigator

Open

Inside of it, go to Environment, select All in the dropdown and search for plotly.

Anaconda

Then select plotly from that list and click Apply.

python 2.7 – ImportError: No module named plotly.plotly in LinuxMint17.3

I had the same problem. I accidentally was using a file in my working directory named ploylt.py. I removed that file form the directory and it works fine now.
First make sure that you have installed plotly

    pip install plotly 

(Test) Open an empty file, type

    import plotly  

and save it with a .py extension. Then run it. If this works, then your installation was ok. Move any other file named plotly (with any extension) in a different directory
It will hopefully work.

Leave a Reply

Your email address will not be published.