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

Installing ipykernel fails with venv environment #1125

Closed
Tracked by #1122
rchiodo opened this issue Feb 3, 2020 · 2 comments
Closed
Tracked by #1122

Installing ipykernel fails with venv environment #1125

rchiodo opened this issue Feb 3, 2020 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Feb 3, 2020

On a machine with an already working jupyter, I did the following:

  1. Cleaned out VS code and all extensions
  2. Ran a cell with the working jupyter
  3. Installed python through Windows store
  4. Installed a virtual environment using 'venv'
  5. Opened VS code and selected new 'venv'
  6. Tried to run a cell

Expected Result:
Ipykernel is installed

Actual Result:
Ipykernel looks like it's installed and then VS code sits there waiting. Looking at the console output I can see that ipykernel didn't really work:

[I 09:47:26.216 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
    from .connect import *
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\site-packages\ipykernel\connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
ModuleNotFoundError: No module named 'IPython'
[I 09:47:29.287 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
    from .connect import *
  File "C:\Users\rchiodo\AppData\Local\Programs\Python\Python36\lib\site-packages\ipykernel\connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
ModuleNotFoundError: No module named 'IPython'
@rchiodo
Copy link
Contributor Author

rchiodo commented Feb 3, 2020

Installing ipython manually into the environment doesn't seem to fix it either.

@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug internal contributor labels Nov 13, 2020
@greazer greazer modified the milestone: July 2021 Release Jun 8, 2021
@greazer greazer added the notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) label Aug 2, 2021
@DonJayamanne
Copy link
Contributor

Issue has been open for almost 1.5 yrs and we've got a few duplicates.
Created by internal user,
Also Python 3.6 will be going out of support in December, hence closing this issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel)
Projects
None yet
Development

No branches or pull requests

3 participants