Skip to content

exp run: no module gpg #10912

@sbucaille

Description

@sbucaille

Bug Report

Description

Hi,
Whenever I need to use dvc exp run I get the following error which comes from dulwich :

ModuleNotFoundError: No module named 'gpg'

The problem does not appear when using dulwich==0.24.2 but starting 0.24.3 the problem appears.
Not sure if I should post here or on scmrepo or on dulwich tho, but here it is.
More info below

Reproduce

Any dvc exp run leads to the problem

Expected

dvc exp run should just run

Environment information

Output of dvc doctor:

DVC version: 3.64.0 (pip)
-------------------------
Platform: Python 3.10.18 on macOS-15.7.2-arm64-arm-64bit
Subprojects:
	dvc_data = 3.16.12
	dvc_objects = 5.1.2
	dvc_render = 1.0.2
	dvc_task = 0.40.2
	scmrepo = 3.5.3
Supports:
	http (aiohttp = 3.13.2, aiohttp-retry = 2.9.1),
	https (aiohttp = 3.13.2, aiohttp-retry = 2.9.1),
	s3 (s3fs = 2025.10.0, boto3 = 1.40.70)
Config:
	Global: /Users/steven.bucaille/Library/Application Support/dvc
	System: /Library/Application Support/dvc
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: s3
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git
Repo.site_cache_dir: /Library/Caches/dvc/repo/8e851585feb399b3f6619da2dc3b9959

Additional Information (if any):

Full logs

dvc exp run data_preprocess -S "image_size=512,1024" --queue --verbose
2025-11-14 14:37:23,498 DEBUG: v3.64.0 (pip), CPython 3.10.18 on macOS-15.7.2-arm64-arm-64bit
2025-11-14 14:37:23,498 DEBUG: command: /Users/steven.bucaille/projects/ray_presentation/.venv/bin/dvc exp run data_preprocess -S image_size=512,1024 --queue --verbose
2025-11-14 14:37:24,786 DEBUG: Using experiment params '{'params.yaml': ['image_size=512']}'
2025-11-14 14:37:24,813 DEBUG: Checking if stage 'data_preprocess' is in 'dvc.yaml'
2025-11-14 14:37:24,952 ERROR: unexpected error - No module named 'gpg'
Traceback (most recent call last):
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/cli/__init__.py", line 212, in main
    ret = cmd.do_run()
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/cli/command.py", line 30, in do_run
    return self.run()
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/commands/experiments/run.py", line 14, in run
    self.repo.experiments.run(
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/repo/experiments/__init__.py", line 354, in run
    return run(self.repo, *args, **kwargs)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/repo/__init__.py", line 59, in wrapper
    return f(repo, *args, **kwargs)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/repo/experiments/run.py", line 97, in run
    queue_entry = repo.experiments.queue_one(
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/repo/experiments/__init__.py", line 136, in queue_one
    return self.new(queue, **kwargs)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/repo/experiments/__init__.py", line 218, in new
    return queue.put(*args, **kwargs)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/repo/experiments/queue/celery.py", line 180, in put
    entry = self._stash_exp(*args, **kwargs)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dvc/repo/experiments/queue/base.py", line 349, in _stash_exp
    stash_rev = self.stash.push(message=msg)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/scmrepo/git/stash.py", line 36, in push
    rev, reset = self.scm._stash_push(  # pylint: disable=protected-access
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/scmrepo/git/__init__.py", line 308, in _backend_func
    result = func(*args, **kwargs)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/scmrepo/git/backend/dulwich/__init__.py", line 823, in _stash_push
    rev = stash.push(message=message_b)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dulwich/stash.py", line 306, in push
    index_commit_id = self._repo.get_worktree().commit(
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dulwich/worktree.py", line 616, in commit
    c.sign(keyid)
  File "/Users/steven.bucaille/projects/ray_presentation/.venv/lib/python3.10/site-packages/dulwich/objects.py", line 1843, in sign
    import gpg
ModuleNotFoundError: No module named 'gpg'

2025-11-14 14:37:24,978 DEBUG: Removing '/Users/steven.bucaille/projects/.Xr-_j6IRcfvo8rpH1BhZoA.tmp'
2025-11-14 14:37:24,979 DEBUG: Removing '/Users/steven.bucaille/projects/.Xr-_j6IRcfvo8rpH1BhZoA.tmp'
2025-11-14 14:37:24,979 DEBUG: Removing '/Users/steven.bucaille/projects/.Xr-_j6IRcfvo8rpH1BhZoA.tmp'
2025-11-14 14:37:24,979 DEBUG: Removing '/Users/steven.bucaille/projects/ray_presentation/.dvc/cache/files/md5/.IOWn2nCjnuefEOZp2n9neA.tmp'
2025-11-14 14:37:24,980 DEBUG: Version info for developers:
DVC version: 3.64.0 (pip)
-------------------------
Platform: Python 3.10.18 on macOS-15.7.2-arm64-arm-64bit
Subprojects:
	dvc_data = 3.16.12
	dvc_objects = 5.1.2
	dvc_render = 1.0.2
	dvc_task = 0.40.2
	scmrepo = 3.5.3
Supports:
	http (aiohttp = 3.13.2, aiohttp-retry = 2.9.1),
	https (aiohttp = 3.13.2, aiohttp-retry = 2.9.1),
	s3 (s3fs = 2025.10.0, boto3 = 1.40.70)
Config:
	Global: /Users/steven.bucaille/Library/Application Support/dvc
	System: /Library/Application Support/dvc
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: s3
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git
Repo.site_cache_dir: /Library/Caches/dvc/repo/8e851585feb399b3f6619da2dc3b9959

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
2025-11-14 14:37:24,985 DEBUG: Analytics is enabled.
2025-11-14 14:37:25,028 DEBUG: Trying to spawn ['daemon', 'analytics', '/var/folders/jm/jx11xhfx7p7bh343_h6wtxgr0000gn/T/tmpn_sg2ed3', '-v']
2025-11-14 14:37:25,036 DEBUG: Spawned ['daemon', 'analytics', '/var/folders/jm/jx11xhfx7p7bh343_h6wtxgr0000gn/T/tmpn_sg2ed3', '-v'] with pid 86830

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions