I installed the yellowbrick python library using pip "install yellowbrick". It was installed, but jupyter notebook cannot import the library. When it imports, results show "No module named 'yellowbrick'". But library had perfectly installed.
My experienced the same thing but I tried and it worked by using the following steps :
Open search on your windows
Look for anaconda prompt, and click
conda install -c districtdatalabs yellowbrick (use the following script to install the yellowbrick module)
enter image description here
Where do I get the script from? Here I attach the link: https://anaconda.org/DistrictDataLabs/yellowbrick
Use the following on your anaconda prompt or command prompt:
conda install yellowbrick
Related
Did pip install pdfrw, uninstalled and reinstalled, restarted my laptop, but still unable to import the specified package as it returns error: No module named 'pdfrw'.
https://pypi.org/project/pdfrw/#pdfrw-philosophy
Any advice is appreciated.
Update: Tried installing by cmd, I'm using Jupyter Notebook as IDE :)
You have to make sure that the Python that you are using with Jupyter Notebook is the same that the one for which you are installing that package. If you have several Python interpreters installed or if you installed Ananconda to use Jupyter, you have to take care of which pip are you invoking from CMD.
If you are using Jupyter from Ananconda, try to install the package using conda.
conda install pdfrw
Another thing that you can do is open a Command Prompt and type:
where python
you will get the path to the interpreters that you have installed. In my case I get:
>>> C:\Windows\system32>where python
C:\Python39\python.exe
C:\Python38\python.exe
>>> C:\Windows\system32>where pip
C:\Python39\Scripts\pip.exe
C:\Python38\Scripts\pip.exe
Then you can use a concrete interpreter to call pip, in my case I will do:
C:\Python39\python.exe -m pip install pdfrw
After the installation finish, invoke the same interpreter you use to call pip:
C:\Python39\python.exe
Then try to import pdfrw. If you can import it, then the problem is that you are using a different interpreter in Jupyter Notebook.
How can i get Open Cv library installed on my Azure Jupyter NoteBook.Having used the command that shows the version of Open Cv,it returns "no module found".Is there a way to go about this
Select console in the left menu. Here you can install modules using pip or conda.
Another way, you can install opencv from Jupyter Notebook using this code:
import sys
!{sys.executable} -m pip install opencv-python
I am having trouble installing yellowbrick.
I am using Anaconda, hence I took advantage of using the "conda install".
# set number of clusters
kclusters = 5
pittsburgh_grouped_clustering = pittsburgh_grouped.drop('Neighborhood', 1)
X = pittsburgh_grouped.drop('Neighborhood', 1)
from sklearn.cluster import KMeans
!conda install -c districtdatalabs yellowbrick
from yellowbrick.cluster import KElbowVisualizer
# instantiate the model and visualizer
model = KMeans()
visualizer = KElbowVisualizer(model, k=(1,10))
visualizer.fit(X) # fit data to visualizer
visualizer.poof() # draw/show/poof the data
I expect the package to be installed. The error message I am receiving is:
ModuleNotFoundError: No module named 'yellowbrick'.
What am I missing?
First install yellowbrick outside of your code and verify that it actually installed. You can do this through the terminal doing exactly what you say. You may need to upgrade/downgrade your libraries which may not be happening when you install in your script.
Then try and run your script without the !conda install -c districtdatalabs yellowbrick because once its installed you don't have to install it again.
Steps to follow:
Open Anaconda Navigator
Environments
Open Terminal
Copy-paste "pip install yellowbrick"
My experienced the same thing but I tried and it worked by using the following steps :
Open search on your windows
Look for anaconda prompt, and click
conda install -c districtdatalabs yellowbrick (use the following script to install the yellowbrick module)
enter image description here
Where do I get the script from? Here I attach the link: https://anaconda.org/DistrictDataLabs/yellowbrick
I am a newbie, was trying to install OpenCV, I used this video for reference-
https://www.youtube.com/watch?v=3xAslL8htuQ
And in the beginning of the video, it was said that python and numpy are prerequisites.
Then I opened command prompt on my Windows 10 and typed-
pip list
So I tried importing numpy on command prompt-
Opened jupyter notebook through Anaconda navigator-
Experts, I don't understand how is Anaconda related to my command prompt. I got "Anaconda" installed on my Windows 10 in a workshop on "Data Analytics". But I don't understand that why can't I import numpy on a Python Shell/IDLE, just like I import it on my command prompt or jupyter notebook. And does pip list only show packages which I can import on command prompt and jupyter notebook but not on Python Shell? Is my Python Shell completely independent of pip list, and Anaconda? If I want to import numpy on IDLE, would I have to install it again? And as I want to learn OpenCV for image processing, should I install OpenCV using pip and then I would be able to import it on my jupyter notebook or command prompt but not on Python IDLE? Is it like Python Shell/IDLE only for normal Python programming but not for using python libraries like tensorflow/numpy/opencv for "Data Analysis"?
Please help. Would mean a lot. My doubts might be really silly because I don't have much knowledge about Anaconda and pip. Thank you.
You can do pip install opencv-contrib-python. Or you can download a pre-compiled whl file for Windows from here.
When i try to use from IPython.display import clear_output, display_html, then i show the error:
(ImportError: No module named IPython)
I am using Python 2.7.13, and im trying to make the game of life from John Conway. I am following this link: http://nbviewer.jupyter.org/url/norvig.com/ipython/Life.ipynb
I have read another questions and answers about it, but any answer works for me. First, this error is showed in command line, and when i try to run this code in a file. Second, this error is direct to IPython, not submodule or something similiar.
Ok, finally i achieved my goal.
I wrote ipython --version but i found, it was not installed.
I tried to install it, with pip. I went to C:\Python27\Scripts, here is pip, you can try in this directory, or add to environment variables.
I tried to install ipython, but i found a error
error: Unable to find vcvarsall.bat
so i installed visual studio c++ 9.0, the version to python 2.7.
pip install ipython
If you scrolled this far you may want to try:
import IPython
as opposed to import Ipython. Notice that 2 letters are capitalized
For Anaconda try,
conda install -c anaconda ipython
Use this code to install the IPython library:
!pip install ipython
import IPython
Well, this works on Google Colab.
This is most likely because ipython is not installed.
You can install it with pip.
pip install ipython
If you are using Anaconda (the full version) ipython comes preinstalled. If you are using Miniconda or if the ipython is deleted for some reason you can re-install with
conda install -c anaconda ipython
If you are using it with jupyter. You might want to register the ipython with a user.
python -m ipykernel install [--user] [--name <machine-readable-name>] [--display-name <"User Friendly Name">]
Reference :
Official Documentation
I have a similar issue, but it appears when I was running the script under sudo. Fast and easiest way was to install IPython under sudo.
sudo pip3 install IPython
I am running a script that uses IPython module, in my terminal. If you are also trying to do something similar, this answer might help you.
!pip3 install IPython
Things to keep in mind:-
'I' and 'P' in IPython are uppercase.
I am running the above command in python 3.7.
you need to import
from IPython.display import Image
initially, I imported
from IPython.display import image
so there is Image not image
For me, the problem (that drove me crazy) is that I actually needed capitalization. The correct import after pip install is:
from IPython.display import display, update_display
etc.