ModuleNotFoundError: No module named 'datefinder' in Jupyter notebook-- but can be imported in terminal - python-3.x

I am trying to use the module datefinder inside Jupyter Notebook. After activating a virtual environment inside the terminal, I installed this module using the following command: conda install -c conda-forge datefinder. When I try to import this module inside Jupyter notebook using from datefinder import find_dates I see this error
ModuleNotFoundError: No module named 'datefinder'
In the terminal (using Python 3.9.6), I can import the module datefinder but not inside the Jupyter Notebook (using Python 3.7.6). After that I also used pip install datefinder inside the Jupyter Notebook to install datefinder. After successfully installing datefinder, when I again tried to import this module, I still saw the same error ModuleNotFoundError: No module named 'datefinder'. The same problem persisted, I could use the module inside terminal and not inside the notebook.
I faced similar problem when installing opencv using conda and troubleshooted this by adding kernel manually as described in this page https://www.programmersought.com/article/97466914065/ . I have also tried by changing the default kernel to the kernel I created manually and then tried to import this module and still I saw the same error.

Perform the installation on the jupyter notebook as shown below:
pip install datefinder
for more go to Github

Related

Python 3.9 quandl NoModuleFound (Jupyter Notebook)

I am using Python3.9 on Windows machine. I created a virtual environment (my_venv) and activated it. cd to the my_venv folder and then did pip3 install quandl if I then run pip3 list I can see Quandl3.7.0 in the list.
making sure I am in the my_venv directory I then run Jupyter Notebook and it launches and says the kernel is called python3 (which is the only kernel available). When I then run import quandl I get "No Module named 'quandl'"
Note: I have tried the import with and without a capital Q and in both cases it gives the same error.

No module named 'cv2' : enivroment issue?

Hey guys I really need help here. When I load up my conda prompt in base env and use pip list it shows that opencv-python is installed.
however when i import cv2 on my jupyter notebook i get an error which says - ModuleNotFoundError: No module named 'cv2'
I then used os.sys.path and it turns out that all the directories point to my conda env named 'py37' and not my base env which i have used to launch the jupyter notebook. How do i make sure all the pip installed packages are available on my base env?

ModuleNotFoundError: No module named 'rasterio' even It is installed from the cmd

I'm using Python 3.7.2 and Pycharm as an IDE. I'm trying to import the rasterio packages but its gives me an error in Pycharm ModuleNotFoundError: No module named 'rasterio'. Even I have installed it from the cmd with the GDAL as it is mentioned here https://rasterio.readthedocs.io/en/stable/installation.html . Apparently all the packages that I want to work with has the same issue with Pycharm as even i installed them via the cmd it gives me always that error. I tried to install the rasterio package from Pycharm just as I did with Numpy but It gives me a GDAL problem. For The numpy it worked just fine. Thanks.

Imported package not available in Jupyter-Python

Importing pysftp into Jupyter Notebook
While importing pysftp into Jupyter Notebook, ModuleNotFoundError is shown.
Checking import of pysftp on device?
I have verified the package installation with
pip list and pip show pysftp
Had imported pysftp package(v0.2.9) and installed it in the below location
C:\users\xxxxxx\appdata\roaming\python\python37\site-packages
Check : Package installed OKAY
Check about package correct path linking from cmd prompt?
I'm using Python 3.7.0 on a WIN machine, verifyed the site package location using
import sys and sys.path
image confirms linking of PATH to correct location and the package is successfully executed when python is run through cmd prompt
Check : Path link and cmd run OKAY
Now could anyone help me solve why the package import in Jupyter Notebook is throwing an error?
Thank you
Edit 1: Check for different environment installed? added based on one of the answer
Only one environment is present in the machine
I got the same. I solved by installing directly within Jupyter using the following command:
import sys
!{sys.executable} -m pip install dice-ml
Are you running the notebook through a virtual environment?
You can try running the same commands as you did on CMD by preceding it with ! as follows:
!pip list
Ideally this should list the same contents as shown in CMD. However the results may be different if you are running Jupyter notebook in a virtual environment. If you are unable to see pysftp, you need to install it within the virtual environment. This can be done from within your notebook as:
!pip install pysftp

Cannot get keras for anaconda windows

I have tried all the methods available to install keras but of no use. when I install it using anaconda prompt it, it installs along Thano. But eveytime I import in jupyter file, jupyter can not find it and gives this error above:
ModuleNotFoundError: No module named 'keras'

Resources