-
Notifications
You must be signed in to change notification settings - Fork 10
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
Change kernel default install location #25
Comments
I am also having this issue. Would love to keep things in a virtual environment |
a good option here would probably be to read an environment variable to allow this to be changed, but really it should default to user dir imo. I have a modified version that successfully installed in my |
If you are running on macOS and hack the install script to work and install, remember to make a link to the install location in
|
I think I'm having the same issue installing in macOS -- running Could someone who got this working share how they hacked the install script? Thank you |
Have you tried creating a venv and installing and running it from that? |
Yes, whether I install in a conda env or in my base macOS it gives the same error.
|
I may have a similar/related issue. I am running HA core on ubuntu 22.04. The python version on ubuntu is 3.10 and cannot be upgraded, since apparently, this would break the OS. However, the latest HA versions want python 3.11. Therefore, I had to install 3.11 in /srv/homeassistant, which is then used in the venv that HA is running in. HA is working, and I also got pyscript working. However, when I activated the venv and executed the instructions to install hass-pyscript-jupyter from within there, it was not working. Is this the same bug, or should I open a new one?
|
P.S.: where would I find the install script? How to hack it? |
I don't think my problem was related. I opened a separate issue here: #27 , and I actually found the solution. |
Just for future references, this also worked for me. I had to change the install script here and set |
You don't need to change the script -- just install 'ipykernel' before you run 'jupyter pyscript install'. You'll need ipykernel anyway, or you'll get "no native python3 kernel available" errors I have a "global" home venv (in ~/.local/home-python) with my zsh PATH prepended with ~/.local/home-python/bin .. and because it's in the path, I don't have to activate it.. it's a cheat so I don't have to create yet another venv for quick and dirty scripts, and so I don't accidentally mess with the homebrew install (since my account can write to it).. (and so homebrew doesn't ruin my day when it suddenly switches the 'system' python from python 3.12 to 3.13 ) in the venv, wherever it is, 'pip install ipykernel' ... THEN run 'jupyter pyscript install'. Because ipykernel gets installed in your venv's 'share' directory, pyscript's kernel ends up there too.... % jupyter pyscript install
PermissionError: [Errno 13] Permission denied: '/usr/local/share'
% pip install ipykernel
# lots of output... :)
% jupyter kernelspec list
Available kernels:
python3 /Users/me/.local/home-python/share/jupyter/kernels/python3
% jupyter pyscript install
installed new pyscript kernel in /Users/me/.local/home-python/share/jupyter/kernels/pyscript
you will need to update the settings in /Users/me/.local/home-python/share/jupyter/kernels/pyscript/pyscript.conf |
I'm trying to install the kernel inside a venv by running
jupyter pyscript install
, as per the instructions in README.md. This is trying to install to/usr/local/share/jupyter
, which I do not want. I see that theinstall_main
method is capable of installing the kernel to a custom directory, only not upon first install.Could you add a parser argument to be able to provide a custom directory? Or set a more user/venv based default?
Thank you!
The text was updated successfully, but these errors were encountered: