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 results in error #16851

Closed
kieferrm opened this issue Jul 29, 2021 · 4 comments
Closed

Installing ipykernel results in error #16851

kieferrm opened this issue Jul 29, 2021 · 4 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug investigating We are looking into the cause of the issue

Comments

@kieferrm
Copy link
Member

Testing microsoft/vscode-jupyter#6821

  1. create a dev container off https://github.com/microsoft/vscode-remote-try-python
  2. create untitled notebook with python code cells
  3. select Python 3.9 kernel
  4. run cells
  5. follow the prompt to install ipykernel
    ->
$ /usr/local/bin/python /home/vscode/.vscode-server-insiders/extensions/ms-python.python-2021.7.1060902895/pythonFiles/shell_exec.py /usr/local/bin/python -m pip install -U ipykernel --user /tmp/tmp-4090QrK3GXIexwoZ.log
Executing command in shell >> /usr/local/bin/python -m pip install -U ipykernel --user
ERROR: Can not combine '--user' and '--target'
Traceback (most recent call last):
  File "/home/vscode/.vscode-server-insiders/extensions/ms-python.python-2021.7.1060902895/pythonFiles/shell_exec.py", line 26, in <module>
    subprocess.check_call(shell_args, stdout=sys.stdout, stderr=sys.stderr)
  File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/python', '-m', 'pip', 'install', '-U', 'ipykernel', '--user']' returned non-zero exit status 1.

When I removed the --user then I got it to work.

@DonJayamanne DonJayamanne removed their assignment Jul 30, 2021
@DonJayamanne
Copy link

Hmm, some windows users are also running into this #16844 (comment)
& whats interesting is the fact that the -u flag doesn't exist.

@DonJayamanne DonJayamanne self-assigned this Aug 2, 2021
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-jupyter Aug 2, 2021
@DonJayamanne
Copy link

DonJayamanne commented Aug 2, 2021

This is easy to repro, just create a Python Dev (docker) container & try to install ipykernel, the command fails.
Python extension adds the --user flag and this causes the installation to fall over.
You can replicate this easily in the terminal

Screen Shot 2021-08-02 at 14 44 15

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Aug 2, 2021
@karthiknadig karthiknadig assigned karrtikr and unassigned DonJayamanne Aug 3, 2021
@karthiknadig karthiknadig added area-environments Features relating to handling interpreter environments triage bug Issue identified by VS Code Team member as probable bug and removed triage-needed Needs assignment to the proper sub-team labels Aug 3, 2021
@brettcannon
Copy link
Member

My guess is the dev container ships with a pip config file which is specifying --target. I'll worry about how potentially difficult/messy dealing this will be until we know for sure that's the cause.

@karrtikr karrtikr added investigating We are looking into the cause of the issue and removed triage labels Aug 9, 2021
@karrtikr
Copy link

karrtikr commented Sep 1, 2021

Not able to reproduce it anymore with standard Python3 devcontainer, seems it was automatically solved.

image

If you're still able to repro let me know and I'll reopen the issue.

@karrtikr karrtikr closed this as completed Sep 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug investigating We are looking into the cause of the issue
Projects
None yet
Development

No branches or pull requests

5 participants