**[Original report](https://bitbucket.org/PyPA/distlib/issue/144) by 林玮 (Jade Lin) (Bitbucket: [林玮 (Jade Lin)](https://bitbucket.org/林玮 (Jade Lin)), ).** ---------------------------------------- The executable path that ScriptMaker got may be a script. For example, the Python executable installed from nix is a bash script like this. ```shell #! /nix/store/ra8yvijdfjcs5f66b99gdjn86gparrbz-bash-4.4-p23/bin/bash -e export NIX_PYTHONPREFIX='/nix/store/i46k148mi830riq4wxh49ki8qmq0731k-python3-3.9.2-env' export NIX_PYTHONEXECUTABLE='/nix/store/i46k148mi830riq4wxh49ki8qmq0731k-python3-3.9.2-env/bin/python3.9' export NIX_PYTHONPATH='/nix/store/i46k148mi830riq4wxh49ki8qmq0731k-python3-3.9.2-env/lib/python3.9/site-packages' export PYTHONNOUSERSITE='true' exec "/nix/store/7pjbbmnrch7frgyp7gz19ay0z1173c7y-python3-3.9.2/bin/python3.9" "$@" ``` ScriptMaker only validates it and adapts it while running on the Java platform. Maybe refactor to apply the adaption for general cases. [https://bitbucket.org/pypa/distlib/src/4f54a3117db58f6bb00c69ab9a892170b91acd3b/distlib/scripts.py#lines-102:125](https://bitbucket.org/pypa/distlib/src/4f54a3117db58f6bb00c69ab9a892170b91acd3b/distlib/scripts.py#lines-102:125)