how to install Plotly 5.1.0 properly to Pycharm using pip to get the chart on jupyter notebook and Pycharm. As a beginner to python, I tried several ways but getting the chart only in the Pycharm but not in jupyter.
1 Answers
I hope that this finds you well.
First thing I do when installing a package is search PyPI for the package I am looking for, in your case you would find pip install plotly
as the install command (you already knew this it seems, but I want to make sure new folks to the thread have this context!)
Second, we can execute terminal/command line commands using an exclamation point in front like !pip install plotly
Then this is what pip command looks like if it downloads successfully
Now this either works and you are done, or it doesn't because the default that pip
is using is a different directory then the one you are importing to. This happens when there are multiple versions of Python on a computer
I would follow this awesome thread for more details on it, but you would typically resolve this issue.
Step one: Check where pip install
is directed to install the package using sys.executable
Step two: Since the Jupyter Notebook installation (from my limited understanding) is its own environment you can use "/where/Jupyter_notebook/is/located -m pip install [package]".
Pycharm is a bit less technical. You can go to tools window> Python packages>search 'ploty'> click install on the upper right corner of the screen
I hope that the above helps you out. This is a pretty tricky concept (I think that this video https://www.youtube.com/watch?v=OJvnUQrPluE does a good job of going over what "should" happen)

- 11
- 1