Last active
July 31, 2018 14:50
-
-
Save stuaxo/3275947a0cb9ef22c322f00764811c62 to your computer and use it in GitHub Desktop.
Set up cloud foundry python to run interactively
This file contains 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
vh="/home/vcap/deps/0"; for fn in $vh/env/*; do f=`basename $fn` && grep -q "/deps/0" $fn && cmd="export $f=/home/vcap$(sed "s#^/[^/]*/[^/]*##" $fn)" || cmd="export $f=$(cat $fn)" && echo $cmd; $cmd; done; export LD_LIBRARY_PATH=$LIBRARY_PATH; export PATH=$vh/bin:$PATH | |
# Above is a oneliner that sets environment variables to use the installed python in cloudfoundry | |
# | |
# It sets environment variables from the files in /home/vcap/deps/0/envs and strips the /tmp/contents... prefix from the paths | |
# It then sets the PATH and LD_LIBRARY_PATH | |
# | |
# Then you can run python and it will run the installed version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Only use one kind of quote