Hi, I have a problem. I am using the library "dronevis" in python, a library for object detection algorithms trained on a specific dataset which, when I run my script and load a model, throws an error saying: "ModuleNotFoundError: No module named 'google_drive_downloader'". The problem is that this module actually exists, I uninstalled and reinstalled it, removed cache, restarted PC, but still I get this messsage. Did anyone ever have the same problem or any similar? Thanking you for your time!
#π Problem with non-existing module which actually exists
28 messages Β· Page 1 of 1 (latest)
@hallow plover
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
Show the full output and the command you ran
nzar@Nikos:/mnt/c/Users/nikos/Documents/drone_ODT/tracker$ python track.py /mnt/c/Users/nikos/Documents/input/video_sample_0.mp4
Evaluating faster R-CNN MobileNet V3 model...
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1737536531.514772 3428 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1737536531.537033 3428 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
Traceback (most recent call last):
File "/mnt/c/Users/nikos/Documents/drone_ODT/tracker/track.py", line 23, in <module>
faster_RCNN_model = torch.load("faster_rcnn_model.pth")
File "/home/nzar/.local/lib/python3.10/site-packages/ultralytics/utils/patches.py", line 86, in torch_load
return _torch_load(*args, **kwargs)
File "/home/nzar/.local/lib/python3.10/site-packages/torch/serialization.py", line 1360, in load
return _load(
File "/home/nzar/.local/lib/python3.10/site-packages/torch/serialization.py", line 1848, in _load
result = unpickler.load()
File "/home/nzar/.local/lib/python3.10/site-packages/torch/serialization.py", line 1837, in find_class
return super().find_class(mod_name, name)
File "/home/nzar/.local/lib/python3.10/site-packages/dronevis/models/init.py", line 12, in <module>
from dronevis.models.croud_count import CrowdCounter
File "/home/nzar/.local/lib/python3.10/site-packages/dronevis/models/croud_count.py", line 7, in <module>
from ezcrowdcount.utils import download_file, preprocess, generate_density_map
File "/home/nzar/.local/lib/python3.10/site-packages/ezcrowdcount/utils.py", line 6, in <module>
from google_drive_downloader import GoogleDriveDownloader as gdd
ModuleNotFoundError: No module named 'google_drive_downloader'
How did you install the google_drive_downloader library?
I saw that there exists a module and loads smoothly called googledrivedownloader but there is not the google_drive_downloader which is inside the dronevis library and I do not know what to do
pip install googledrivedownloader but there does not exist the same with underscores
try python -m pip instead of pip
Run the same install command again, and post the output here
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement google_drive_downloader (from versions: none)
ERROR: No matching distribution found for google_drive_downloader
nzar@Nikos:~$ python -m pip install googledrivedownloader
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: googledrivedownloader in ./.local/lib/python3.10/site-packages (1.1.0)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from googledrivedownloader) (2.25.1)```
The one with the underscores does not work, the other says that I already have it installed as it is also said by the simple `pip install`
I've found the problem
googledrivedownloader has renamed their module from google_drive_downloader to googledrivedownloader, breaking dronevis
As a temporary fix, you can edit the /home/nzar/.local/lib/python3.10/site-packages/ezcrowdcount/utils.py file directly and replace google_drive_downloader with googledrivedownloader
Looks like you need to file an issue at both dronevis and ezcrowdcount, to hopefully fix it in a feature update. It would help if you file a PR as well
@hallow plover
yes, that is what I just did, seems to work, thank you very much for your time
π np; kind of stupid that googledrivedownloader just changed their module name, breaking literally everything that uses it
yes, and I am suffering as my main work is writting low level C code and distributed systems using java and I hate my life as I have to use python for some projects in univercity
Hehe better get used to solving packaging problems like this π
Python is all packages and no code
Literally most developement time is just trying to install all the necessary modules and make them work with all the versions. I really hate it. It's just "complete the puzzle pieces" and it gets on my nerves not knowing exactly what happens under the hood with memory etc
@fleet oracle well now I got another problem π . Now I get the following error (ImportError):
File "/mnt/c/Users/nikos/Documents/drone_ODT/tracker/track.py", line 24, in <module>
faster_RCNN_model = torch.load("faster_rcnn_model.pth")
File "/home/nzar/.local/lib/python3.10/site-packages/ultralytics/utils/patches.py", line 86, in torch_load
return _torch_load(*args, **kwargs)
File "/home/nzar/.local/lib/python3.10/site-packages/torch/serialization.py", line 1360, in load
return _load(
File "/home/nzar/.local/lib/python3.10/site-packages/torch/serialization.py", line 1848, in _load
result = unpickler.load()
File "/home/nzar/.local/lib/python3.10/site-packages/torch/serialization.py", line 1837, in find_class
return super().find_class(mod_name, name)
File "/home/nzar/.local/lib/python3.10/site-packages/dronevis/models/__init__.py", line 12, in <module>
from dronevis.models.croud_count import CrowdCounter
File "/home/nzar/.local/lib/python3.10/site-packages/dronevis/models/croud_count.py", line 7, in <module>
from ezcrowdcount.utils import download_file, preprocess, generate_density_map
File "/home/nzar/.local/lib/python3.10/site-packages/ezcrowdcount/utils.py", line 6, in <module>
from googledrivedownloader import GoogleDriveDownloader as gdd
ImportError: cannot import name 'GoogleDriveDownloader' from 'googledrivedownloader' (/home/nzar/.local/lib/python3.10/site-packages/googledrivedownloader/__init__.py)```
I have been searching for the class for a while now but I can not seem to find anything
I might be able to resolve this actually I think I am almost there
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.