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

Could not install ipykernel in devcontainer #7737

Closed
mjbvz opened this issue Sep 28, 2021 · 8 comments
Closed

Could not install ipykernel in devcontainer #7737

mjbvz opened this issue Sep 28, 2021 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Sep 28, 2021

Testing #7680

  1. On MacOS
  2. Open the jupyter-datascience-notebooks dev container from https://github.com/Microsoft/vscode-dev-containers
  3. Follow instructions in test plan item up to running the cell
  4. Click prompt to install ipykernel

Bug
I get a error notification :

Could not install ipykernel. If pip is not available, please use the package manager of your choice to manually install this library into your Python environment.

Potentially relevant other logs from dev tools:

Screen Shot 2021-09-28 at 4 16 08 PM

I was using the following kernel:

Screen Shot 2021-09-28 at 4 17 24 PM

@mjbvz
Copy link
Contributor Author

mjbvz commented Sep 28, 2021

Hm looks like I'm not using the kernel from virtualenv I just created, however it doesn't show up in the list of kernels:

Screen Shot 2021-09-28 at 4 20 05 PM

@rchiodo
Copy link
Contributor

rchiodo commented Sep 28, 2021

@mjbvz Two questions:

  • Did you have the latest python insiders installed?
  • Did you create the virtual env before starting VS code?

The pip error means you have to get pip yourself. Not sure why we don't just run 'ensurepip' but here's the directions:
https://pip.pypa.io/en/stable/installation/

@rchiodo rchiodo added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster labels Sep 28, 2021
@mjbvz
Copy link
Contributor Author

mjbvz commented Sep 28, 2021

  1. Yes I believe so. Here's the extra information:
  • Python ext version: v2021.10.1283853053-dev
  • Jupyter ext version: v2021.9.1001281857
  • Host OS: MacOS 11.6
  • Remote OS: Linux e8ce3374e5c4 5.10.47-linuxkit #1 SMP Sat Jul 3 21:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  1. I think so but here's more info about what I did:

    1. First I opened the data science dev container from vscode-dev-containers
    2. Then I ran python -m venv mytestEnv
    3. Then I opened the mytestEnv folder (still inside that container)

Let me know if I should try something different instead

@rchiodo
Copy link
Contributor

rchiodo commented Sep 28, 2021

When you say this:

Then I opened the mytestEnv folder (still inside that container)

Do you mean you opened this as a folder in VS code?

That would prevent that virtual environment from being listed. You should open the folder just above that.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 28, 2021

And because of this bug here:
#7583

you have to create the virtual env before opening the folder in VS code

@mjbvz
Copy link
Contributor Author

mjbvz commented Sep 28, 2021

Ah yes that was the issue! After opening the parent folder, I could select the kernel and then install worked properly

@rchiodo
Copy link
Contributor

rchiodo commented Sep 28, 2021

I'm going to open another issue to make us install pip. Seems weird that we can't just install it.

@rchiodo rchiodo closed this as completed Sep 28, 2021
@DonJayamanne
Copy link
Contributor

I'm going to open another issue to make us install pip. Seems weird that we can't just install it.

We're waiting on telemetry for this, Brett didn't want to install Pip as he didn't believe it was the right solution when I submitted a PR to do that in the Python extension.

@rchiodo /cc

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 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 info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants