direnv v2.34.0 and earlier using deprecated pkgutil.find_loader. [vagrant@localhost ~]$ rpm -q direnv direnv-2.32.3-5.fc41.x86_64 [vagrant@localhost ~]$ cat project-a/.envrc layout python3 [vagrant@localhost ~]$ cd project-a/ direnv: loading ~/project-a/.envrc <string>:1: DeprecationWarning: 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead import pkgutil as u, platform as p;ve='venv' if u.find_loader('venv') else ('virtualenv' if u.find_loader('virtualenv') else '');print('.'.join(p.python_version_tuple()[:2])+' '+ve) direnv: export +VIRTUAL_ENV ~PATH https://github.com/direnv/direnv/issues/1177 indicates the cause. https://github.com/direnv/direnv/commit/af06cb05c1468f4b80a7548818d096625fb04c36 indicates the upstream direnv fix. Reproducible: Always Steps to Reproduce: 1. $ sudo dnf -y install direnv 2. $ echo eval "$(direnv hook bash)" >> ~/.bashrc 3. $ mkdir ~/project-a 4. $ python -m venv ~/project-a/.venv 5. $ cd ~/project-a 6. $ echo 'layout python3' > .envrc 7. $ direnv allow Actual Results: [vagrant@localhost ~]$ cd project-a/ direnv: loading ~/project-a/.envrc <string>:1: DeprecationWarning: 'pkgutil.find_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec() instead import pkgutil as u, platform as p;ve='venv' if u.find_loader('venv') else ('virtualenv' if u.find_loader('virtualenv') else '');print('.'.join(p.python_version_tuple()[:2])+' '+ve) direnv: export +VIRTUAL_ENV ~PATH Expected Results: direnv invokes the venv without throwing the exception. https://github.com/direnv/direnv/issues/1177 indicates the cause. https://github.com/direnv/direnv/commit/af06cb05c1468f4b80a7548818d096625fb04c36 indicates the upstream direnv fix.