Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG]: canot deactivate on nushell #3103

@Rignchen

Description

@Rignchen

Issue

Expected:

~/.dotfiles> use venv/bin/activate.nu *
(venv) > deactivate
~/.dotfiles>

Observed:

~/.dotfiles> use venv/bin/activate.nu *
(venv) > deactivate
Error: nu::parser::active_overlay_not_found

  × Active overlay not found.
    ╭─[/home/rignchen/.dotfiles/venv/bin/activate.nu:87:40]
 86  export alias pydoc = python -m pydoc
 87  export alias deactivate = overlay hide activate
    ·                                        ────┬───
    ·                                            ╰── not an active overlay
    ╰────
(venv) >

When I try to deactivate the virtual environment I get an active_overlay_not_found error and I stay in the virtual environment

Environment

Provide at least:

  • OS: nixos 25.11.8352.107cba9eb4a8 (Xantusia) on Linux 6.19.9
  • Shell: nushell 0.111.0
  • Python version and path: Python 3.14.3 /nix/store/1mm6my83i8f2f4wc7gcdw0db9yhs4zp4-python3-3.14.3-env/bin/python3.14
  • pip list of the host python where virtualenv is installed:
    I don't have pip on my computer as that's not how NixOs works, but I have these libraries in my nixos configuration
(python314.withPackages (python-pkgs: with python-pkgs; [
	requests
	regex
	pytest
	virtualenv
]))

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:

178 setup logging to NOTSET [DEBUG report:36]
187 find interpreter for spec PythonSpec(path=/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin/python3.14) [INFO builtin:78]
188 filesystem is case-sensitive [DEBUG info:27]
188 proposed PythonInfo(spec=CPython3.14.3.final.0-64, exe=/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin/python3.14, platform=linux, version='3.14.3 (main, Feb  3 2026, 15:32:20) [GCC 14.3.0]', encoding_fs_io=utf-8-utf-8) [INFO builtin:85]
188 accepted PythonInfo(spec=CPython3.14.3.final.0-64, exe=/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin/python3.14, platform=linux, version='3.14.3 (main, Feb  3 2026, 15:32:20) [GCC 14.3.0]', encoding_fs_io=utf-8-utf-8) [DEBUG builtin:87]
192 symlink on filesystem does work [DEBUG info:50]
266 create virtual environment via CPython3Posix(dest=/home/rignchen/.dotfiles/venv, clear=False, no_vcs_ignore=False, global=False) [INFO session:52]
267 create folder /home/rignchen/.dotfiles/venv/bin [DEBUG _sync:14]
267 create folder /home/rignchen/.dotfiles/venv/lib/python3.14/site-packages [DEBUG _sync:14]
268 write /home/rignchen/.dotfiles/venv/pyvenv.cfg [DEBUG pyenv_cfg:35]
268 	home = /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin [DEBUG pyenv_cfg:40]
268 	implementation = CPython [DEBUG pyenv_cfg:40]
268 	version_info = 3.14.3.final.0 [DEBUG pyenv_cfg:40]
268 	virtualenv = 20.33.1 [DEBUG pyenv_cfg:40]
268 	include-system-site-packages = false [DEBUG pyenv_cfg:40]
269 	base-prefix = /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3 [DEBUG pyenv_cfg:40]
269 	base-exec-prefix = /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3 [DEBUG pyenv_cfg:40]
269 	base-executable = /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin/python3.14 [DEBUG pyenv_cfg:40]
269 symlink /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin/python3.14 to /home/rignchen/.dotfiles/venv/bin/python [DEBUG _sync:34]
270 create virtualenv import hook file /home/rignchen/.dotfiles/venv/lib/python3.14/site-packages/_virtualenv.pth [DEBUG api:98]
270 create /home/rignchen/.dotfiles/venv/lib/python3.14/site-packages/_virtualenv.py [DEBUG api:101]
271 ============================== target debug ============================== [DEBUG session:54]
271 debug via /home/rignchen/.dotfiles/venv/bin/python /nix/store/zbqp2l462cyavw1lkjx072vgnyqhfhb3-python3.14-virtualenv-20.33.1/lib/python3.14/site-packages/virtualenv/create/debug.py [DEBUG creator:215]
271 {
  "sys": {
    "executable": "/home/rignchen/.dotfiles/venv/bin/python",
    "_base_executable": "/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin/python3.14",
    "prefix": "/home/rignchen/.dotfiles/venv",
    "base_prefix": "/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3",
    "real_prefix": null,
    "exec_prefix": "/home/rignchen/.dotfiles/venv",
    "base_exec_prefix": "/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3",
    "path": [
      "/nix/store/zbqp2l462cyavw1lkjx072vgnyqhfhb3-python3.14-virtualenv-20.33.1/lib/python3.14/site-packages",
      "/nix/store/8szfdry2wx2yy75y62i8d25fifi32635-python3.14-distlib-0.4.0/lib/python3.14/site-packages",
      "/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/lib/python3.14/site-packages",
      "/nix/store/lpcz7pcqwv9zf7szapbj3p0s8h9410wr-python3.14-filelock-3.20.3/lib/python3.14/site-packages",
      "/nix/store/w7lkbb4kd8liz7839zmcxh4nyibzcid9-python3.14-platformdirs-4.5.0/lib/python3.14/site-packages",
      "/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/lib/python314.zip",
      "/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/lib/python3.14",
      "/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/lib/python3.14/lib-dynload",
      "/home/rignchen/.dotfiles/venv/lib/python3.14/site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "utf-8"
  },
  "version": "3.14.3 (main, Feb  3 2026, 15:32:20) [GCC 14.3.0]",
  "makefile_filename": "/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/lib/python3.14/config-3.14-x86_64-linux-gnu/Makefile",
  "os": "<module 'os' (frozen)>",
  "site": "<module 'site' (frozen)>",
  "datetime": "<module 'datetime' from '/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/lib/python3.14/datetime.py'>",
  "math": "<module 'math' from '/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/lib/python3.14/lib-dynload/math.cpython-314-x86_64-linux-gnu.so'>",
  "json": "<module 'json' from '/nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/lib/python3.14/json/__init__.py'>"
} [DEBUG session:55]
354 add seed packages via FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/rignchen/.local/share/virtualenv) [INFO session:59]
355 got embed update of distribution pip from /home/rignchen/.local/share/virtualenv/wheel/3.14/embed/3/pip.json [DEBUG via_disk_folder:132]
363 got embed update of distribution pip from /home/rignchen/.local/share/virtualenv/wheel/3.14/embed/3/pip.json [DEBUG via_disk_folder:132]
364 install pip from wheel /nix/store/zbqp2l462cyavw1lkjx072vgnyqhfhb3-python3.14-virtualenv-20.33.1/lib/python3.14/site-packages/virtualenv/seed/wheels/embed/pip-25.1.1-py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:51]
365 Attempting to acquire lock 140067951586544 on /home/rignchen/.local/share/virtualenv/wheel/3.14/image/1/CopyPipInstall/pip-25.1.1-py3-none-any.lock [DEBUG _api:331]
365 Lock 140067951586544 acquired on /home/rignchen/.local/share/virtualenv/wheel/3.14/image/1/CopyPipInstall/pip-25.1.1-py3-none-any.lock [DEBUG _api:334]
366 Attempting to release lock 140067951586544 on /home/rignchen/.local/share/virtualenv/wheel/3.14/image/1/CopyPipInstall/pip-25.1.1-py3-none-any.lock [DEBUG _api:364]
366 Lock 140067951586544 released on /home/rignchen/.local/share/virtualenv/wheel/3.14/image/1/CopyPipInstall/pip-25.1.1-py3-none-any.lock [DEBUG _api:367]
366 copy /home/rignchen/.local/share/virtualenv/wheel/3.14/image/1/CopyPipInstall/pip-25.1.1-py3-none-any/pip-25.1.1.virtualenv to /home/rignchen/.dotfiles/venv/lib/python3.14/site-packages/pip-25.1.1.virtualenv [DEBUG _sync:42]
367 copy directory /home/rignchen/.local/share/virtualenv/wheel/3.14/image/1/CopyPipInstall/pip-25.1.1-py3-none-any/pip-25.1.1.dist-info to /home/rignchen/.dotfiles/venv/lib/python3.14/site-packages/pip-25.1.1.dist-info [DEBUG _sync:42]
369 copy directory /home/rignchen/.local/share/virtualenv/wheel/3.14/image/1/CopyPipInstall/pip-25.1.1-py3-none-any/pip to /home/rignchen/.dotfiles/venv/lib/python3.14/site-packages/pip [DEBUG _sync:42]
438 generated console scripts pip3 pip3.14 pip-3.14 pip [DEBUG base:45]
438 add activators for Bash, CShell, Fish, Nushell, PowerShell, Python [INFO session:65]
444 write /home/rignchen/.dotfiles/venv/pyvenv.cfg [DEBUG pyenv_cfg:35]
444 	home = /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin [DEBUG pyenv_cfg:40]
444 	implementation = CPython [DEBUG pyenv_cfg:40]
444 	version_info = 3.14.3.final.0 [DEBUG pyenv_cfg:40]
444 	virtualenv = 20.33.1 [DEBUG pyenv_cfg:40]
444 	include-system-site-packages = false [DEBUG pyenv_cfg:40]
444 	base-prefix = /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3 [DEBUG pyenv_cfg:40]
444 	base-exec-prefix = /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3 [DEBUG pyenv_cfg:40]
444 	base-executable = /nix/store/w9f9jj6mbrk4146wm69qlyssjghildlf-python3-3.14.3/bin/python3.14 [DEBUG pyenv_cfg:40]
445 created virtual environment CPython3.14.3.final.0-64 in 269ms
  creator CPython3Posix(dest=/home/rignchen/.dotfiles/venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/rignchen/.local/share/virtualenv)
    added seed packages: pip==25.1.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator [WARNING __main__:22]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions