* [ISSUE] venv installed packages stopped working with jupyter lab
@ 2024-03-20 20:19 Eloitor
2024-03-20 20:51 ` classabbyamp
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Eloitor @ 2024-03-20 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]
New issue by Eloitor on void-packages repository
https://github.com/void-linux/void-packages/issues/49402
Description:
### Is this a new report?
Yes
### System Info
Void 6.6.22_1 x86_64 GenuineIntel uptodate hold rFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
### Package(s) Affected
python3-3.12.2_2, jupyterlab-4.0.12_1
### Does a report exist for this bug with the project's home (upstream) and/or another distro?
https://github.com/marimo-team/marimo/issues/968
### Expected behaviour
I install a package in a python venv following the instuctions from
and after activating it I can use it in jupyter lab. https://github.com/void-linux/void-packages/issues/47135#issuecomment-1826828577
This worked for me before but no longer works??? I don't know what happened...
### Actual behaviour
An installed package with venv is available to use in jupyter lab (after activating the environment)
### Steps to reproduce
1. Install jupyterlab
```
python -m venv --system-site-packages ~/venv
git clone https://github.com/gdamjan/hello-world-python-package.git
cd hello-world-python-package
~/venv/bin/pip install -e .
cd ..
. ~/venv/bin/activate
jupyter lab
```
In jupyter lab
```
from cool_lib import a
```
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: venv installed packages stopped working with jupyter lab
2024-03-20 20:19 [ISSUE] venv installed packages stopped working with jupyter lab Eloitor
@ 2024-03-20 20:51 ` classabbyamp
2024-03-20 21:40 ` Eloitor
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2024-03-20 20:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/issues/49402#issuecomment-2010601257
Comment:
`~/venv/bin/python -m ipykernel install --name my_cool_venv` and it will show up as a kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: venv installed packages stopped working with jupyter lab
2024-03-20 20:19 [ISSUE] venv installed packages stopped working with jupyter lab Eloitor
2024-03-20 20:51 ` classabbyamp
@ 2024-03-20 21:40 ` Eloitor
2024-03-20 21:44 ` Eloitor
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Eloitor @ 2024-03-20 21:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
New comment by Eloitor on void-packages repository
https://github.com/void-linux/void-packages/issues/49402#issuecomment-2010688130
Comment:
Thanks!! This works with `jupyter lab` very cool trick to be able to use kernels with custom environments!
However this trick does not work with marimo as it does not use ipython. #48818
This worked before, but I'm very surprised that it doesn't work now....
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: venv installed packages stopped working with jupyter lab
2024-03-20 20:19 [ISSUE] venv installed packages stopped working with jupyter lab Eloitor
2024-03-20 20:51 ` classabbyamp
2024-03-20 21:40 ` Eloitor
@ 2024-03-20 21:44 ` Eloitor
2024-03-20 22:03 ` Eloitor
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Eloitor @ 2024-03-20 21:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
New comment by Eloitor on void-packages repository
https://github.com/void-linux/void-packages/issues/49402#issuecomment-2010688130
Comment:
Thanks!! This works with `jupyter lab` very cool trick to be able to use kernels with custom environments!
However this trick does not work with marimo as it does not use ipython. #48818
This worked before, and I'm very surprised that it doesn't work now....
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: venv installed packages stopped working with jupyter lab
2024-03-20 20:19 [ISSUE] venv installed packages stopped working with jupyter lab Eloitor
` (2 preceding siblings ...)
2024-03-20 21:44 ` Eloitor
@ 2024-03-20 22:03 ` Eloitor
2024-03-21 13:07 ` ahesford
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Eloitor @ 2024-03-20 22:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
New comment by Eloitor on void-packages repository
https://github.com/void-linux/void-packages/issues/49402#issuecomment-2010722828
Comment:
mmm... runing `python -m marimo edit test.py` works. But before I only needed `marimo edit test.py`
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: venv installed packages stopped working with jupyter lab
2024-03-20 20:19 [ISSUE] venv installed packages stopped working with jupyter lab Eloitor
` (3 preceding siblings ...)
2024-03-20 22:03 ` Eloitor
@ 2024-03-21 13:07 ` ahesford
2024-03-21 13:07 ` [ISSUE] [CLOSED] " ahesford
2024-03-21 20:19 ` Eloitor
6 siblings, 0 replies; 8+ messages in thread
From: ahesford @ 2024-03-21 13:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/issues/49402#issuecomment-2012251375
Comment:
This is expected behavior. When packages are built with `xbps-src`, the shebang in Python scripts is deliberately overwritten to use `/usr/bin/python3` instead of whatever Python interpreter might be in your path. Hence, running `jupyter` will ignore the virtual environment. We do this to ensure that Void-packaged Python scripts behave in a predictable manner.
If you want to override the shebang in Void-packaged scripts, you'll have to explicitly run the interpreter. You can write a wrapper or define an alias to make this happen.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ISSUE] [CLOSED] venv installed packages stopped working with jupyter lab
2024-03-20 20:19 [ISSUE] venv installed packages stopped working with jupyter lab Eloitor
` (4 preceding siblings ...)
2024-03-21 13:07 ` ahesford
@ 2024-03-21 13:07 ` ahesford
2024-03-21 20:19 ` Eloitor
6 siblings, 0 replies; 8+ messages in thread
From: ahesford @ 2024-03-21 13:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]
Closed issue by Eloitor on void-packages repository
https://github.com/void-linux/void-packages/issues/49402
Description:
### Is this a new report?
Yes
### System Info
Void 6.6.22_1 x86_64 GenuineIntel uptodate hold rFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
### Package(s) Affected
python3-3.12.2_2, jupyterlab-4.0.12_1
### Does a report exist for this bug with the project's home (upstream) and/or another distro?
https://github.com/marimo-team/marimo/issues/968
### Expected behaviour
I install a package in a python venv following the instuctions from
and after activating it I can use it in jupyter lab. https://github.com/void-linux/void-packages/issues/47135#issuecomment-1826828577
This worked for me before but no longer works??? I don't know what happened...
### Actual behaviour
```
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from cool_lib import a
ModuleNotFoundError: No module named 'cool_lib'
```
### Steps to reproduce
1. Install jupyterlab
2. Run:
```
python -m venv --system-site-packages ~/venv
git clone https://github.com/gdamjan/hello-world-python-package.git
cd hello-world-python-package
~/venv/bin/pip install -e .
cd ..
. ~/venv/bin/activate
jupyter lab
```
3. In jupyter lab
```
from cool_lib import a
```
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: venv installed packages stopped working with jupyter lab
2024-03-20 20:19 [ISSUE] venv installed packages stopped working with jupyter lab Eloitor
` (5 preceding siblings ...)
2024-03-21 13:07 ` [ISSUE] [CLOSED] " ahesford
@ 2024-03-21 20:19 ` Eloitor
6 siblings, 0 replies; 8+ messages in thread
From: Eloitor @ 2024-03-21 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 257 bytes --]
New comment by Eloitor on void-packages repository
https://github.com/void-linux/void-packages/issues/49402#issuecomment-2013653738
Comment:
This makes sense, but it is very strange too, because I was using this until yesterday when it stopped working...
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-21 20:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 20:19 [ISSUE] venv installed packages stopped working with jupyter lab Eloitor
2024-03-20 20:51 ` classabbyamp
2024-03-20 21:40 ` Eloitor
2024-03-20 21:44 ` Eloitor
2024-03-20 22:03 ` Eloitor
2024-03-21 13:07 ` ahesford
2024-03-21 13:07 ` [ISSUE] [CLOSED] " ahesford
2024-03-21 20:19 ` Eloitor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).