1

I tried following the instructions here: VSCode Integrated Terminal Doesn't Load .bashrc or .bash_profile

From within Visual Studio Code:

(base) jespinozlt2-osx:~ jespinoz$ ~/anaconda3/bin/python --version
Python 3.7.3
(base) jespinozlt2-osx:~ jespinoz$ which python
/usr/bin/python
(base) jespinozlt2-osx:~ jespinoz$ source ~/.bash_profile
(base) jespinozlt2-osx:~ jespinoz$ which python
/usr/bin/python
(base) jespinozlt2-osx:~ jespinoz$ which conda
/Users/jespinoz/anaconda3/bin/conda

I simply just want it to do the following:

  1. Run source ~/.bash_profile at start up

  2. Not use /usr/bin/python at all just like my normal terminal usage

My current settings file:

{
    "python.pythonPath": "/Users/jespinoz/anaconda3/bin/python",
    "workbench.colorTheme": "FlatUI Immersed",
    "terminal.external.osxExec": "iTerm.app",
    "terminal.integrated.automationShell.osx": "",
    "terminal.integrated.shell.osx": "/usr/local/bin/bash-login",

}

The contents of bash-login:

(base) jespinozlt2-osx:~ jespinoz$ cat /usr/local/bin/bash-login
#!/bin/bash
bash -l

~/.bash_profile

# added by Anaconda3 installer

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/jespinoz/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/jespinoz/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/jespinoz/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/jespinoz/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
O.rka
  • 29,847
  • 68
  • 194
  • 309
  • You can put `PATH=~/anaconda3/bin/python:$PATH` in your `~/.bash_profile` – Philippe May 01 '20 at 21:20
  • I should have added my bash_profile. It's already in there which is whyt his is so surprising to me. – O.rka May 01 '20 at 21:26
  • It's in the `else` section, so it's not in effect. You can check by `echo $PATH` – Philippe May 01 '20 at 21:29
  • It's the default in my path when I use the terminal or iTerm but not Visual Studio Code `(base) jespinozlt2-osx:~ jespinoz$ which python /Users/jespinoz/anaconda3/bin/python` – O.rka May 01 '20 at 21:35

0 Answers0