I use anaconda for virtual env, and when I open an intergrated terminal in VScode, it looks like:
(my_env) (base) guest1@am:~$
Things seem to go right after I disabled the Python pluggin.
I noticed that the PATH is odd comparing to Xshell or Pycharm.
With Python pluggin, the PATH looks like:
/sd1/guest1/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/bin/remote-cli:
/sd1/guest1/.conda/envs/my_env/bin:
/home/pxr/anaconda3/condabin:/home/pxr/anaconda3/bin:
/usr/local/sbin:/usr/local/bin:
/usr/sbin:/usr/bin:
/sbin:
/bin:
/usr/games:
/usr/local/games:
/usr/local/cuda/bin:
/opt/pycharm-community-2020.2.3/bin:
/snap/bin:
/usr/local/cuda/bin:
/home/pxr/anaconda3/bin:
/sd1/guest1/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/bin/remote-cli:
/home/pxr/anaconda3/bin:
/home/pxr/anaconda3/condabin:
/home/pxr/anaconda3/bin:
/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:
/bin:
/usr/games:
/usr/local/games:
/usr/local/cuda/bin:
/opt/pycharm-community-2020.2.3/bin:
/snap/bin:
/usr/local/cuda/bin:
/sd1/guest1/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/bin/remote-cli:
/home/pxr/anaconda3/bin:
/home/pxr/anaconda3/condabin:
/home/pxr/anaconda3/bin:
/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:
/bin:
/usr/games:
/usr/local/games:
/usr/local/cuda/bin:
/opt/pycharm-community-2020.2.3/bin:
/snap/bin:
/usr/local/cuda/bin:
/usr/local/cuda/bin
after I disabled the Python pluggin and restart VScode, PATH looks like:
/home/pxr/anaconda3/bin:/sd1/guest1/.vscode-server/cli/servers/Stable-f1e16e1e6214d7c44d078b1f0607b2388f29d729/server/bin/remote-cli:
/home/pxr/anaconda3/bin:
/home/pxr/anaconda3/condabin:
/home/pxr/anaconda3/bin:
/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:
/bin:
/usr/games:
/usr/local/games:
/usr/local/cuda/bin:
/opt/pycharm-community-2020.2.3/bin:
/snap/bin:
/usr/local/cuda/bin:
/usr/local/cuda/bin
it’s still a bit odd because when using xshell, the path looks like:
/home/pxr/anaconda3/bin:
/home/pxr/anaconda3/condabin:
/home/pxr/anaconda3/bin:
/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:
/bin:
/usr/games:
/usr/local/games:
/usr/local/cuda/bin:
/opt/pycharm-community-2020.2.3/bin:
/snap/bin:
/usr/local/cuda/bin
pycharm activate the env for me, but the other parts are same as xshell:
/sd1/guest1/.conda/envs/my_env/bin:/home/pxr/anaconda3/condabin:/home/pxr/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda/bin:/opt/pycharm-community-2020.2.3/bin:/snap/bin:/usr/local/cuda/bin
I believe the Python pluggin must have done something, but I can’t solve it.
I tried on VScode, within or not the Python pluggin, and with Xshell or Pycharm. I hope by changing some settings of VS code, it can give the same output of “echo $PATH” like Xshell or Pycharm.
July Wu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.