-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conda activate is failing when conda is in '/usr/bin/' folder #10902
Comments
Conda activate is not DS specific, removing DS label. |
@rchiodo This only fails for the Jupyter Server. Everywhere else the conda environment seems to be applied fine. |
What does 'Select Interpreter to start Jupyter' show as the current selection? Does it match your python path? And does the selection box indicate it thinks the interpreter is a conda interpreter (the selection box should show something like so for the item you have selected) Those should be all true, but for some reason the code we run doesn't realize that python path is a conda environment. |
The one I intend to be selected is the When using 'Python: Select Interpreter' (not the Jupyter one), here also the first item in the list is the one highlighted, but selecting an interpreter does modify the |
When using 'Select Interpreter to start Jupyter' to select the 'base' environment, where I don't have Jupyter installed, the extension correctly shows me an error about that: When selecting my custom environment, nothing seems to happen, but presumably the extension does see that Jupyter is installed. Just in case, here is my environment.yml file. |
The 'jupyter' interpreter is not saved in your settings. It's in a different spot. But regardless, it thinks it's a conda environment, so it should be launching it with conda activate. It looks to me like there's a bug somewhere in this code here: In the function |
There is indeed a Just in case, my bash shell seems to need a plain
Note: |
@junrrein, we just published a new release of the extension. Please verify you are still seeing the problem after updating. Thanks! |
@ericsnowcurrently, I'm now using version 2020.5.78807 of the extension. Unfortunately, I'm still hitting the same issue as in the OP:
|
I am having the same issue I think
I can use jupyter notebooks using base python and even conda base however it fails with all conda envs. on further digging i found an issue with conda when creating a new env.
I think this may be caused by installing conda as su. try uninstalling as here: https://docs.anaconda.com/anaconda/install/uninstall/ you need to do full uninstall then reinstall without sudo this seems to have fixed my problem. |
I have installed |
FWIW I'm also having this issue. For some reason, it wants to source an activate script instead of calling |
I'm having a very similar issue:
My conda is in '/usr/bin/conda'
I was able to locate the activate file using |
I'm having a similar issue. I am using VS code on WSL and have installed Miniconda. I have created an environment inside a project directory, and VS Code correctly locates that environment which I can select from the interpreters list. When I go to open an integrated terminal however, I get: ben@Firefly:~/Projects/myproj$ source activate /home/ben/Projects/myproj/env
bash: activate: No such file or directory For some reason |
Having the same issue. |
I am having the same issue; activation of the environment is using |
The above suggestion fixes nothing for me, after setting the conda path to /usr/local/Caskroom/miniconda/base/condabin/, I'm still getting a "source activate ..." line that fails with "no such file or directory" (since the is no such file or directory there, so I'm unable to see how it could fix anything). |
Ok, the problem is that, at least in a brew installation, the
is in:
while
I don't know what is the best approach to fix this (besides manually configuring the path). Probably vscode should do |
#11039 should solve this issue. The fix should already be out if you want to try it: |
Environment data
Workspace Settings
Actual behavior
Starting a Jupyter Notebook server fails with error:
Expected behavior
The extension should use plain
conda activate
to activate the conda environment, as the extension does (I think?) when opening a terminal.Steps to reproduce:
sudo dnf install conda
conda create --name vscode-test notebook
import sys
) and run it.Notes
May be related to #2315 and #7671 and the way they were solved.
The text was updated successfully, but these errors were encountered: