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

Failed to install IPyKernel on windows in PowerShell prompt due to permission error #8332

Closed
DonJayamanne opened this issue Nov 22, 2021 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) verified Verification succeeded
Milestone

Comments

@DonJayamanne
Copy link
Contributor

CLI in terminal:

PS C:\Development\samples\pySamples\sample1> & C:/Python39/python.exe c:\Users\donja\.vscode-insiders\extensions\ms-python.python-2021.12.1482249642-dev\pythonFiles\shell_exec.py C:/Python39/python.exe -m pip install -U --force-reinstall ipykernel C:/Users/donja/AppData/Local/Temp/tmp-2125271eMrG3H1d7D.log
Executing command in shell >> C:/Python39/python.exe -m pip install -U --force-reinstall ipykernel

Heres' the error (output in terminal)

   from C:\Users\donja\AppData\Local\Temp\pip-uninstall-zomt3253\pywin32.chm    
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\pywin32.pth
   from C:\Users\donja\AppData\Local\Temp\pip-uninstall-zomt3253\pywin32.pth    
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\pywin32.version.txt
   from C:\Users\donja\AppData\Local\Temp\pip-uninstall-zomt3253\pywin32.version.txt
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\pywin32_system32\
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\~ywin32_system32
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\win32\ 
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\~in32      
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\win32com\
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\~in32com   
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\win32comext\adsi\
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\win32comext\~dsi
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\win32comext\authorization\
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\win32comext\~uthorization
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\win32comext\axcontrol\
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\win32comext\~xcontrol
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\win32comext\axdebug\
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\win32comext\~xdebug
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\win32comext\~hell
  Moving to c:\users\donja\appdata\roaming\python\python39\site-packages\win32comext\taskscheduler\
   from C:\Users\donja\AppData\Roaming\Python\Python39\site-packages\win32comext\~askscheduler
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: 'C:\\Python39\\Scripts\\pywin32_postinstall.py'
Consider using the `--user` option or check the permissions.

WARNING: Ignoring invalid distribution -raitlets (c:\users\donja\appdata\roaming\python\python39\site-packages)
WARNING: Ignoring invalid distribution -raitlets (c:\users\donja\appdata\roaming\python\python39\site-packages)
WARNING: Ignoring invalid distribution -raitlets (c:\users\donja\appdata\roaming\python\python39\site-packages)
WARNING: You are using pip version 21.2.3; however, version 21.3.1 is available.You should consider upgrading via the 'C:\Python39\python.exe -m pip install --upgrade pip' command.
Traceback (most recent call last):
  File "c:\Users\donja\.vscode-insiders\extensions\ms-python.python-2021.12.1482249642-dev\pythonFiles\shell_exec.py", line 26, in <module>
    subprocess.check_call(shell_args, stdout=sys.stdout, stderr=sys.stderr)
  File "C:\Python39\lib\subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:/Python39/python.exe', '-m', 'pip', 'install', '-U', '--force-reinstall', 'ipykernel']' returned non-zero exit status 1.
@DonJayamanne DonJayamanne added the bug Issue identified by VS Code Team member as probable bug label Nov 22, 2021
@DonJayamanne DonJayamanne self-assigned this Nov 22, 2021
@DonJayamanne
Copy link
Contributor Author

Fixed by #8325

@DonJayamanne DonJayamanne added this to the November 2021 milestone Nov 22, 2021
@DonJayamanne DonJayamanne added notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) and removed needs-triage labels Nov 22, 2021
@rchiodo rchiodo added the verified Verification succeeded label Dec 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2023
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) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants