Hello everyone,
I have a problem similar to the one discussed on this reddit forum, which deals with some clash of Python environments when installing Qtile on NixOS. To elaborate, I have this on my configuration.nix
:
services.xserver.windowManager = {
qtile = {
enable = true;
};
};
...
environment.systemPackages = with pkgs; [
...
(let
my-python-packages = python-packages: with python-packages; [
matplotlib
numpy
pandas
scikit-learn
];
python-with-my-packages = python3.withPackages my-python-packages;
in
python-with-my-packages)
...
];
If I disable Qtile I am able to work with my globally defined Python environment:
$ python -c "import numpy"
$ python -c "import sys; print(sys.prefix)"
/nix/store/kc9bsiwsbadhs165ryr4b6xbsb0wccmc-python3-3.9.6-env
However, when I enable Qtile the Python environment changes, and the packages I added globally are not available anymore:
$ python -c "import numpy"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
$ python -c "import sys; print(sys.prefix)"
/nix/store/z43s37a755b2i8nd6mibjzjjjjdl7f3n-qtile-0.18.1
How could I use Qtile and at the same time keep my global environment?