Import Plotly from Pycharm

Hi there,
I’m new to plotly I’ve tried several times to run this code but it seems that the import doesn’t work. There is no error in the console and the first print is never printed, could someone help me ?

here is my code :

import plotly
from plotly.graph_objs import Scatter, Layout

print(“helloWorld”)

plotly.offline.plot({
“data”: [Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])],
“layout”: Layout(title=“hello world”)
})

it maybe can’t import function ? i meet it too.

please use example:
from plotly.graph_objs as ob

Hi, I know this is an old post, but I’ve been doing plotly work recently and had to do these things for pycharm to run it. If this is obvious and you already did this, excuse my reply, from a terminal window within pycharm, install plotly packages:
sudo pip3 install plotly
sudo pip3 install plotly.io
sudo pip3 install chart_studio

there is also a plotly-orca they say is needed to save png images of charts, but I haven’t found a compatible download version of this, I am actually here looking for info on orca.

sudo is needed (mac or linux) to make sure you have rights to install the files in the right place, usually somewhere under /usr/local/lib.

Just a word of caution- be careful with installs and do it the same way each time preferably via a virtual environment manager, pycharm manages installs well, so does conda or homebrew, but you can create conflicts particularly if you have py v2.x and 3.x on the same box (spoken from experience!), hope this was of some help.
Brian