i try to make a Django app, when i try to install a library via pip, its show error:
× This environment is externally managed
╰─> This command has been disabled as it tries to modify the immutable
`/nix/store` filesystem.
To use Python with Nix and nixpkgs, have a look at the online documentation:
<https://nixos.org/manual/nixpkgs/stable/#python>.
Can you provide dev.nix file for Django Project. I am using custom dev.nix file but I don’t know how to make changes in dev.nix file. I also tried to read documentation but still not able to run comment to activate virtual environment on onStart.
you are right, i adjust file and error is gone. but i have another error while preview.
edit: i open project again and this error also fixed. but in terminal:
apitest-3xxxx39:~/api$ /nix/store/4cb33zcc0i7wrnmwwfp9q4y2p4fas9gd-active-venv
source /home/user/api/.venv/bin/activate
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
apitest-3xxxx39:~/api$ source /home/user/api/.venv/bin/activate
(.venv) apitest-3xxxx39:~/api$