GoogleCloudPlatform / docker-clamav-malware-scanner

Apache License 2.0
68 stars 74 forks source link

ModuleNotFoundError: No module named 'pkg_resources' #240

Open yhar opened 1 month ago

yhar commented 1 month ago

Hello,

I am doing step Perform an initial population of the ClamAV malware database mirror in Cloud Storage: python3 -m venv pyenv . pyenv/bin/activate pip3 install crcmod cvdupdate ./updateCvdMirror.sh "cvd-mirror-${PROJECT_ID}" deactivate

Results to: Traceback (most recent call last): File "/home/.../docker-clamav-malware-scanner/cloudrun-malware-scanner/pyenv/bin/cvdupdate", line 5, in from cvdupdate.main import cli File "/home/.../docker-clamav-malware-scanner/cloudrun-malware-scanner/pyenv/lib/python3.12/site-packages/cvdupdate/main.py", line 42, in from cvdupdate import auto_updater File "/home/.../docker-clamav-malware-scanner/cloudrun-malware-scanner/pyenv/lib/python3.12/site-packages/cvdupdate/auto_updater.py", line 3, in from cvdupdate.cvdupdate import CVDUpdate File "/home/.../docker-clamav-malware-scanner/cloudrun-malware-scanner/pyenv/lib/python3.12/site-packages/cvdupdate/cvdupdate.py", line 28, in import pkg_resources

ModuleNotFoundError: No module named 'pkg_resources'

/pyenv/lib/python3.12/site-packages/cvdupdate/ files were not available?

Reference:

  1. Perform an initial population of the ClamAV malware database mirror in Cloud Storage: https://cloud.google.com/architecture/automate-malware-scanning-for-documents-uploaded-to-cloud-storage/deployment#create_scanner_service

Many thanks!

nielm commented 1 month ago

I cannot reproduce this in my environment, but I am using python 3.11.9, maybe it is a python 3.12 issue?

It does look like the pip3 install of cvdupdate has failed -- you could try re-running pip3 install crcmod cvdupdate