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

Install kernel dependencies with the -U flag #4758

Closed
DonJayamanne opened this issue Feb 11, 2021 · 6 comments
Closed

Install kernel dependencies with the -U flag #4758

DonJayamanne opened this issue Feb 11, 2021 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel)

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Feb 11, 2021

When install ipykernel, etc we should update the depednencies.
We have had plenty of cases where users had it installed, but versions were incorrect.
They had to uninstall & re-install.

For instance I had an issue with ipykernel in a conda environment.
Had an old version of ipython, hence when installing ipykernel, an old compatible version got installed. However that version of ipython is too old, similarly its possible the versio of ipykernel is also old.

The solution was conda install ipykernel --update-deps --force-reinstall
We might want to do the same for pip install ipykernel -U --force-reinstall

How to test/validate

  • Install latest dev version of Python extension with the changes (here's the PR in Python ext Support for Jupyter to pass additional install args vscode-python#16133)
  • Use conda & non conda
  • Get notebooks working
  • Uninstall pyzmq (a dependency),
  • Now ipykernel is installed, but it doesn't work, hence re-installing ipykernel will not work
  • Try now, and it should force re-install
@DonJayamanne DonJayamanne added the bug Issue identified by VS Code Team member as probable bug label Feb 11, 2021
@DavidKutu DavidKutu self-assigned this Mar 17, 2021
@DonJayamanne
Copy link
Contributor Author

We might also want to consider makign it possible to pass in the argument --force-reinstall.
We found at least in 2 occasions that this works.
hence we might have scenarios where we have -U as well as --force-reinstall.

TLDR - ensure we can pass more than just the one argument.

@DavidKutu DavidKutu removed their assignment Mar 17, 2021
@greazer greazer added this to the April 2021 Release milestone Mar 24, 2021
@greazer greazer added the notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) label Mar 25, 2021
@greazer greazer modified the milestones: April 2021 Release, May 2021 Release Apr 1, 2021
@greazer greazer modified the milestones: May 2021 Release, June 2021 Release Apr 23, 2021
@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Apr 30, 2021

This works, see here #5689 (user tried this approach to get unblocked recently)

@DonJayamanne
Copy link
Contributor Author

We should probably use --update-deps --force-reinstall only when first install of ipykernel fails.
Probably worth discussing with team.

@DonJayamanne
Copy link
Contributor Author

Discussed solution:

  • if ipykernel is available (pip list), then pass flags to Python to force update & force re-install

@joyceerhl
Copy link
Contributor

joyceerhl commented May 17, 2021

I do get a prompt for conda and non conda environments, but for conda the install command fails. Rerunning the same command that the extension generates in the terminal doesn't work. I had to rerun the bare install command from Anaconda Prompt. Not sure if this is a VS Code integrated terminal issue.

Conda:
image

Conda install errors out:
image

Non-conda (pip):
image

@DavidKutu
Copy link

validated, in both the jupyter and python extensions

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2021
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-kernel Kernels issues (start/restart/switch/execution, install ipykernel)
Projects
None yet
Development

No branches or pull requests

4 participants