Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not honoring conda virtual envs. #159

Open
sccolbert opened this issue Oct 11, 2019 · 6 comments
Open

Not honoring conda virtual envs. #159

sccolbert opened this issue Oct 11, 2019 · 6 comments

Comments

@sccolbert
Copy link

Is there a way to disable Terminus from inheriting Sublimes env, and using the default shell env? This is required to pickup conda virtual envs. VSCode has a setting for this to make their terminals work.

OSX Terminal:

(base) Chriss-iMac:~ chris$ which python
/Users/chris/miniconda3/bin/python

Terminus:

(base) Chriss-iMac:~ chris$ which python
/usr/bin/python  
@randy3k
Copy link
Owner

randy3k commented Oct 11, 2019

What shell are you using? What do you mean the default shell env? In default, Terminus opens a bash shell with login in flag. Did you set the PATH variable in bash (or whatever you have) profile?

@sccolbert
Copy link
Author

It's bash with a bash_profile that sets up the virtual env(s). It's seems that profile script is executing differently in terminus vs terminal.

@sccolbert
Copy link
Author

link to VSCode issue: microsoft/vscode-python#7607

@randy3k
Copy link
Owner

randy3k commented Oct 11, 2019

We don’t need that to fix the PATH issue. How did you specify the PATH variable in.bash_profile? Or you have set it in a different way?

@sccolbert
Copy link
Author

sccolbert commented Oct 12, 2019

It's not actually set in .bash_profile. The .bash_profile eventually calls out to conda, which is a Python script, which does quite a bit of logic to set up the bath. I think that one of things it does is tries to be smart and not clobber the PATH env if it's been inherited from a parent, hence the solution VSCode is using. I only mentioned the VSCode issue because the behavior it presented is exactly the same as what I'm seeing in Terminus.

@randy3k
Copy link
Owner

randy3k commented Oct 12, 2019

It's not actually set in .bash_profile.
So how it was set in the macOS Terminal?

The .bash_profile eventually calls out to conda, which is a Python script, which does quite a bit of logic to set up the bath.

conda doesn't setup the PATH variable, it is controlled by the shell profile. Look for something like export PATH="$HOME/miniconda3/bin;$PATH". If it doesn't present, just add it.

I think that one of things it does is tries to be smart and not clobber the PATH env if it's been inherited from a parent, hence the solution VSCode is using. I only mentioned the VSCode issue because the behavior it presented is exactly the same as what I'm seeing in Terminus.

Not inheriting the env variables is just a temporary solution to fix your issue of the PATH variable. I am not saying that it would not fix the issue. For sure that it will help the situation. But you also need to figure out the ultimate reason why the PATH was not set correctly and it will save you more time in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants