ImportError: No module named watchdog.observers - python-3.x

I am stuck with this issue
ImportError: No module named watchdog.observers
I have done pip install and whatever I can find.
I am running on macOS --version Catalina.
Please help if you have any suggestions how to solve this.

Try importing a specific class/function:
from watchdog.observers import Observer
Try installing watchdog with root-privileges for your version of python:
sudo pip install watchdog
or
sudo pip2 install watchdog
or
sudo pip3 install watchdog
Seeing your code would be helpful.

Related

Unable to find dmtx shared library

I installed pylibdmtx. When I try to import this I get an error:
from pylibdmtx import pylibdmtx
ImportError: Unable to find dmtx shared library
I am using python 3.8.8 on mac.
try re-installing both, via pip and using apt-get, if this not works, the error is probably that Python wrapper can`t load libdmtx.
pip3 install pylibdmtx
sudo apt-get install libdmtx0a
I installed it this way:
brew install libdmtx
problem solved!

tkinter not found in python-3.8 while it is working in python-3.5

I just installed python-3.8.3 on ubuntu. while tkinter was working on python-3.5, I am getting error import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter' on python-3.8.3. I did sudo apt-get install python3-tk, but the problem still persists.
https://stackoverflow.com/a/51114470/12977390
oh... may be you should try with:
sudo apt install python3-tkinter
i do use fedora linux, and python3-tk does't work, but '-tkinter' do.
tell me if was successful

virt-manager - ImportError: No module named ordered_dict

I have KVM server, it has python2.7 version. Now along with python2.7, python3 have been installed. Now if I try to do virt-manager I am getting the following error:
from .packages.urllib3.packages.ordered_dict import ordered_dict
ImportError: No module named ordered_dict
If I remove python3, will it effect any other 2.7 packages/libraries ? .
You need to install urllib3==1.22, later versions not working with requests.
In my case, Ubuntu Xenial, with
sudo pip uninstall urllib3
virt-manager worked again
Please follow below steps to resolve the issue.
sudo pip uninstall requests
sudo pip uninstall urllib3
sudo pip install requests

ImportError:'save_weights' requires h5py

When I save weights during training my CNN model using keras, it says ImportError:'save_weights' requires h5py, but I have already installed h5py.
I would greatly appreciate if someone could explain how to fix this issue.
Just install necessary packages
sudo apt-get install libhdf5-dev
pip install h5py
If you are using windows and python IDE, open cmd and input following commands:
pip install h5py
pip install cython
I hope it helps.
I was getting the same error as you.
I installed all the requirements listed here: https://github.com/fchollet/keras/issues/3426
Finally just needed to reboot and it started working.
As suggested by others:
pip install h5py
Note that this may not immediately resolve the issue in your active session and you may need to reload keras.models either through the following commands or by just creating a new session/re-opening your jupyter notebook.
In Python3:
from importlib import reload
reload(keras.models)
In Python2:
use importlib.import_module instead. See docs for a reference.
These additional steps may be necessary because of the try/except ImportError in keras sourcecode that assigns h5py = None when it's unable to locate it the first time it's executed.
In my case, re-installing did the trick:
pip uninstall -y cython h5py
pip install cython h5py
(Windows 10, Conda, Keras 2.4.3)
I think you may miss this
from keras.applications import imagenet_utils
I got the same problem even though I have imported the h5py.
It is the load error with the keras. It has to be reloaded.
import keras
from importlib import reload
reload(keras.models)
It has worked for me.
h5py==2.10.0 works well with TF >= 2.1 so try 'pip install h5py==2.10.0'
Have you tried directly installing h5py? http://docs.h5py.org/en/latest/build.html
Try running:
pip install h5py
or
sudo apt-get install libhdf5

ImportError: No module named htmlmin.minify

Command:
python3 pgadmin4-1.1/web/setup.py
Error:
ImportError: No module named 'htmlmin.minify'
I had a similar problem with htmlmin module, but I solved with:
sudo pip3 install htmlmin
Any suggestion? Thanks.
I solved with:
sudo pip3 install django-htmlmin
Thanks
Every time you pull new code make sure to run
pip3 install -r pgadmin4-1.1/requirements_py3.txt

Resources