question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jupyter doesn't work with conda virtual environment except "base" virtual environment

See original GitHub issue

Bug: Notebook Editor, Interactive Window, Editor cells

Cant run jupyter notebook cell in a newly created virtual environment using conda. But it’s working fine when using default virtual conda environment “base”.

Steps to cause the bug to occur

  1. Create a new environment with conda create -n my_environment python=3.6
  2. Activate a new environment conda activate my_environment ore by selecting it in vscode
  3. Try to use jupyter notebook

Actual behavior

actual_begaviar_sell

actual_behavior_conda_env

Expected behavior

axpected_behavior_jupyter

Jupyter and/or Python environment

  • Jupyter server running: Local
  • Extension version: 2019.11.5
  • VS Code version: 1.40.2
  • Python and/or Anaconda version: 3.6.9/4.7.12
  • OS: Mac
  • Virtual environment: conda

Developer Tools Console Output

Error: Activating Python 3.6.9 64-bit ('machine_learning_with_real_world_projects': conda) to run Jupyter failed with Error: Command failed: . activate penv && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python /Users/***/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/printEnvVariables.py Could not find conda environment: penv You can list all discoverable environments with 'conda info --envs'.

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidKutucommented, Dec 2, 2019

Sorry to hear that, we’ll look into it.

0reactions
DonJayamannecommented, Nov 30, 2020

@ayushnoori Please could you file a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python 3.x - Jupyter Notebook working under conda base but ...
Have you tried opening jupyter notebook in base env and then changing env from there. To do that you would need to install...
Read more >
Trying to understand which environment is active when ...
According to the docs, when I start a Jupyter notebook from the terminal it should start in the virtual environment (venv).
Read more >
Virtual Environments - Problem Solving with Python
When a new virtual environment is created, no packages are installed by default. If you use the Anaconda distribution of Python, the base...
Read more >
What to do when things go wrong - The Jupyter Notebook
Multiple python environments, whether based on Anaconda or Python Virtual environments, are often the source of reported issues. In many cases, these issues...
Read more >
Conda Virtual Environments with Jupyter - Jake Tae
After installing a package, I had no trouble importing it on PyCharm or Sublime. Of course, there were some packages that simply didn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found