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

spyder-kernels requires administrative privileges #463

Open
rukie opened this issue Jul 19, 2023 · 8 comments
Open

spyder-kernels requires administrative privileges #463

rukie opened this issue Jul 19, 2023 · 8 comments

Comments

@rukie
Copy link

rukie commented Jul 19, 2023

I work in an organization with restrictive policies, but we are able to access pip.
Python and Pip are managed through a software center.
When trying to use Spyder with a managed python installation, users don't have the appropriate privileges to install packages in the default directory.

I'd like to understand how to get around this problem, or improve path variables, or such, for users to install spyder-kernels successfully in a non-standard directory without administrative privileges.

For reference, files are installed in AppData Roaming directories of the user's local folders.
C:\Users{Username}\AppData\Roaming{Python3X}\site-packages

I don't have a machine available to test this on, but I'm curious if trying to install with
python3 -m pip install --user spyder-kernels
would recreate the issue.

Relevant issues:
spyder-ide/spyder#17608

@AJ528
Copy link

AJ528 commented Aug 29, 2023

I also encountered this issue. With spyder-kernels installed as a normal user, I ran into the same issues as spyder-ide/spyder#17608. After uninstalling and reinstalling as admin, the problem was solved.

@ccordoba12
Copy link
Member

Hey folks, sorry for the late response. We're investigating why this happens but we'd appreciate your help to try to solve it.

Could you apply a simple change to the Spyder or Spyder-kernels code to see if that fixes it?

@rukie
Copy link
Author

rukie commented Oct 20, 2023

What change would you like to try?

@ccordoba12
Copy link
Member

ccordoba12 commented Nov 2, 2023

@rukie, thanks for offering your help! Please open a terminal (i.e. cmd.exe) and run there

echo %APPDATA%

Then copy the result and go to this file in Spyder (in the directory where it's installed):

https://github.com/spyder-ide/spyder/blob/5.x/spyder/plugins/ipythonconsole/utils/kernelspec.py

and add the following to it:

imagen

Hopefully that should solve the problem of detecting Spyder-kernels when it's installed in the APPDATA directory.

@akalbekov
Copy link

akalbekov commented Jan 25, 2024

@rukie, thanks for offering your help! Please open a terminal (i.e. cmd.exe) and run there

echo %APPDATA%

Then copy the result and go to this file in Spyder (in the directory where it's installed):

https://github.com/spyder-ide/spyder/blob/5.x/spyder/plugins/ipythonconsole/utils/kernelspec.py

and add the following to it:

imagen

Hopefully that should solve the problem of detecting Spyder-kernels when it's installed in the APPDATA directory.

Hi @ccordoba12, I have the same problem after testing pip install spyder-kernels==2.4.0 without admin privileges.
"You can install it by activating your environment first (if necessary) and then running in a system terminal:
conda install spyder-kernels=2.4
or
pip install spyder-kernels==2.4.*"

I have anaconda installed spyder and this solution adding APPDATA directory didn't work,
image

Is there any other kernelspec.py file other than in the folder below?

C:\Users\akalbekov\AppData\Local\anaconda3\pkgs\spyder-5.4.3-py311haa95532_1\Lib\site-packages\spyder\plugins\ipythonconsole\utils

Thanks.

@rukie
Copy link
Author

rukie commented Mar 27, 2024

On the latest asset we set up, this did not seem to resolve it.

@rukie
Copy link
Author

rukie commented May 29, 2024

Any other ideas? Still running into this.

@rukie
Copy link
Author

rukie commented Sep 6, 2024

Not a fix, but installing Python in a non-restricted location like C:\Python instead of C:\Program Files\ seems to help avoiding write restrictions.

Still haven't figured out how to get spyder-kernels to work in a user directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants