Repository navigation
Jupyter doesn't work with anaconda #5539
Description
Activity
- ghost addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on May 2, 2019 - ghost removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on May 3, 2019 - ghost addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on May 6, 2019 This is not datascience specific. I think the error is we're using '. ' instead of source, although from this
https://github.com/Microsoft/vscode-python/blob/b741e1af6d53cdf94765a6708964d489bd558ff8/src/client/interpreter/activation/service.ts#L105It looks like it was on purpose.
- addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
on May 16, 2019 - ghost removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on May 16, 2019 Don Jayamanne (@DonJayamanne) Rich Chiodo (@rchiodo) Uwe L. Korn (@xhochy)
Building the latest extension version from github master, activation errors still persist with conda.
Basically, before a recent PR (#5516, #4402), I think it was trying to do something like this, which is wrong:
$ <ENV>/activate Error: activate must be sourced. Run 'source activate envname' instead of 'activate envname'.
Now it's trying to do something like this (but it's also still wrong!):
$ source <ENV>/bin/activate Error: no environment provided.
It should be either this:
$ source <ENV>/bin/activate <ENV>
Or, as a matter of fact, conda guys officially suggest using
conda activateandconda deactivateinstead of sourcing things manually: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environmentThe only way I can make it work (and this is on conda/macOS) is replacing the
<ENV>/activatescript in the environment with this one-liner (where<ENV>is the full absolute path to the environment):export $PATH=<ENV>/bin:$PATH
Then the Jupyter stuff launches fine (just to verify).
This is weird. The latest nightly is working for me with conda 4.6. What conda version do you have installed?
Uwe L. Korn (@xhochy) conda is 4.6.14, the extension I've just built from the latest master, with a clean install.
Again, seeing what the extension is trying to do - e.g., even jupyter aside, if you select some code and shift-enter, it tries to fire a python console, and prior to that attempts to activate the environment like this:
source <ENV>/bin/activate, which doesn't seem right.4 remaining items
The plugin tries to find a
condaexecutable from the same or upper directory of current interpreter (https://github.com/DonJayamanne/pythonVSCode/blob/f590f9c89ae5ee31f33bc66626e9f8279ea17763/src/client/interpreter/locators/services/condaService.ts#L249)
but thecondaexecutable is located in<conda_path>/condabinin current version.
So what the problem with just runningcondacommand fromPATH?What have helped me is to install VS Code from the Anaconda Navigator and starting the application from there. Not sure if it will help you though. (macOS)
- addedarea-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsand removed
on Oct 10, 2019 https://github.com/microsoft/vscode-python/issues/8928 Might resolve this
Luciana Abud (@luabud) may I take this up?
Should be addressed with #15818
- locked as resolved and limited conversation to collaborators
on Nov 26, 2021
Environment data
Expected behaviour
Jupyter loads correctly
Actual behaviour
it fails to load with anaconda
Steps to reproduce:
Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Output from
Consoleunder theDeveloper Toolspanel (toggle Developer Tools on underHelp; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging)