I dropped Selenium
with pip3
, but when I opened Jupyter Notebook, I was addicted to the following error, so I wrote an article about how to deal with it.
In python package storage location, I somehow realized that the PATH of the package location is not in the PATH. I tried it through the path in PATH on Mac, but it didn't work.
Therefore, this time I solved it by myself, so I will explain how to do it below.
First, on the console, I hit the command pip3 show [Package Name]
to see where Selenium was.
The place of Location:
is the place where Selenium is dropped. In my case, it seems to be in / usr / local / lib / python3.7 / site-packages
.
Next, I opened Jupyter Notebook and checked the PATH that I was passing through with the following command. (I put a mosaic on my user name.)
Looking at this, you can see that /usr/local/lib/python3.7/site-packages
is missing.
I tried to specify the PATH by referring to Put the PATH on Mac, but it didn't work, so execute the following command in Jupyter Notebook. I ran it.
Now ʻimport selenium` has run without error.
This is how to resolve ModuleNotFoundError: No module named XXX in Jupyter Notebook.
Recommended Posts