I installed plotly.py to work some plots using Jupyter but I cannot import it.
! pip install plotly --upgrade
Requirement already up-to-date: plotly in c:\\pytho
To import seaborn, sklearn and plotly on jupyter notebook first run this on terminal for python "pip install ipykernel", for anaconda "conda install ipykernel" or "python -m ipykernel install"
Running following on command prompt solved my issue.
conda install -c https://conda.anaconda.org/plotly plotly
It is likely that the plotly installed via pip install is somehow not detected by Jupter.
! pip install plotly --upgrade fix the error in my error but pip install plotly from cmd in anaconda did not help
Install the cufflinks library along with the plotly.
pip install plotly
pip install cufflinks
This solved the plotly no module error on the Jupyter notebook.
After a while searching about this problem, I discovered it is a broken conda-kernel trough jupyter notebook.
Inside your notebook check if it is pointing to the write python executable's envinronment path by:
import sys
sys.executable
# >>>> 'C:\\Users\\username\\AppData\\Local\\Continuum\\anaconda3\\envs\\**wrong_env**\\python.exe'
If it isn't, the simple solution is to install nb_conda
:
conda install nb_conda
In the jupyter notebook, running the correct kernel you want the package to be installed, run
import sys
!conda install --yes --prefix {sys.prefix} plotly
This installs plotly within the correct kernel.