# Python not seeing my Gtk dependency (works in nix-shell, not in configuration.nix nor a package)

**URL:** https://discourse.nixos.org/t/python-not-seeing-my-gtk-dependency-works-in-nix-shell-not-in-configuration-nix-nor-a-package/69115
**Category:** Help
**Created:** [September 9, 2025, 9:10am UTC](https://discourse.nixos.org/t/python-not-seeing-my-gtk-dependency-works-in-nix-shell-not-in-configuration-nix-nor-a-package/69115 "2025-09-09T09:10:17Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![573](https://discourse.nixos.org/user_avatar/discourse.nixos.org/573/32/2640_2.png) [@573](https://discourse.nixos.org/u/573)
#### Post date: [September 10, 2025, 5:35am UTC](https://discourse.nixos.org/t/python-not-seeing-my-gtk-dependency-works-in-nix-shell-not-in-configuration-nix-nor-a-package/69115/4 "2025-09-10T05:35:58Z")

</div>

[One of the](https://discourse.nixos.org/t/cannot-run-reproducible-pygobject-example-script/22855/2) dependencies you listed or their transitive dependencies provide the setup hook that is run when `nix-shell` is run ([Code search results · GitHub](https://github.com/search?q=repo%3ANixOS%2Fnixpkgs+GIO_EXTRA_MODULES&type=code&p=1)).

---

_[View the full topic](https://discourse.nixos.org/t/python-not-seeing-my-gtk-dependency-works-in-nix-shell-not-in-configuration-nix-nor-a-package/69115)._
