Hello, I’m having some trouble in providing a dev shell (via flake) which I need to provide python3
and awscli2
packages, awscli2
is python app that depends on botocore
library, my team need python3
for an older project (developed in old fashioned way, venv+pip) that depends also on an older version of botocore
library, is there a way to “isolate” the python3
interpreter provided by the nix shell in order to not include the dependencies of awscli2
and avoid conflicts?
I am not sure I understand correctly what you mean by isolate. Do you need 2 different versions of botocore in the same mkShell ? Do you need both to be available in sitePackages ? What do you need to happen when you type python -c "import botocore"
?
I premise that I’m inexperienced in the python world.
I was expecting that the python installed in the nix shell wasn’t aware of the dependencies needed by awscli2
(also installed through the same shell), but the subsequent venv created (manually) inherits all the site-pacakges installed “globally” (exposed by nix), which is why I had version conflicts of botocore
.
The solution I found is to unset the PYTHONPATH
env var before activating the venv to obtain an hermetic environment
maybe there is a better method, but for the moment it’s ok this way
Thank you