Run Cell does not find Jupyter in virtual environment
See original GitHub issueEnvironment data
- VS Code version: 1.29.1
- Extension version (available under the Extensions sidebar): 2018.11.0
- OS and version: MacOSX 10.14.1
- Python version (& distribution if applicable, e.g. Anaconda): homebrew python 3.7.1
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): pipenv
- Relevant/affected Python packages and their versions: jupyter notebooks
Actual behavior
Notification with the message: Running cells requires Jupyter notebooks to be installed.
I am able to start jupyter notebook in my virtual environment.
Expected behavior
Jupyter Notebook being started.
Steps to reproduce:
- Create a jupyter python file
- Click the Run Cell
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Microsoft Python Language Server version 0.1.65.0
Initializing for /Users/.../.local/share/virtualenvs/jupyter_vscode-_1tZN8jX/bin/python
Linter 'flake8' is not installed. Please install it or select another linter".
Error: Module 'flake8' not installed.
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
In the console of the Developper Tools I see that the plug-in is looking for Jupyter in a bunch of my pyenv Python but not my virtualenv.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:30 (15 by maintainers)
Top Results From Across the Web
Run Cell does not find Jupyter in virtual environment #3774
Notification with the message: Running cells requires Jupyter notebooks to be installed. I am able to start jupyter notebook in my virtual environment....
Read more >What to do when things go wrong - The Jupyter Notebook
If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command...
Read more >Jupyter Notebook in virtual environment doesn't see the virtual ...
the solution is to open jupyter notebook with following command: ~/virtualenv/my_venv_name/bin/jupyter-notebook.
Read more >How to Install Virtual Environments in Jupyter Notebook on Mac
Open Terminal : The Terminal is an emulator that's used in Jupyter Notebook to access the file system of the server from the...
Read more >Using Jupyter Notebook in Virtual Environments for Python ...
Jupyter notebooks are an interactive environment where you can write and execute Python code, as well as add markdown cells to explain your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We need to ‘activate’ the virtual env prior to running jupyter. Right now we’re just using the same python.
The other jupyters running is us searching for one that will work. We don’t actually need the same environment to start jupyter, we just need to point it at the correct one (see jupyter kernel specs).
Although now that we know we need to activate it, this will likely change too, as I doubt Jupyter/iPython activates the virtual environment before using it.
Okay thanks. That helps. Looks like virtual pipenvs aren’t supported yet then.