Last active
August 23, 2019 16:17
-
-
Save jessehub/b0d582a913262974d9a36e4013e3c5f3 to your computer and use it in GitHub Desktop.
Create exec-wrapper for the active conda python environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Environment name (ENVNAME) wrapper creator, allowing for execution within that python virtual environ | |
# invoking as eg: ~/ENVNAME/run-in <command> [<args>] | |
# Requires https://github.com/gqmelo/exec-wrappers | |
PYTHONPATH=`which python` | |
BINDIR=`dirname $PYTHONPATH` | |
ENVDIR=`dirname $BINDIR` | |
ENVNAME=`basename $ENVDIR` | |
create-wrappers -t conda --bin-dir $BINDIR --dest-dir ~/$ENVNAME --conda-env-dir $ENVDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment