{
"marimo": "0.23.8",
"editable": false,
"location": "C:/Users/user/AppData/Local/Programs/Python/Python314/Lib/site-packages/marimo",
"OS": "Windows",
"OS Version": "11",
"Processor": "Intel64 Family 6 Model 140 Stepping 1, GenuineIntel",
"Python Version": "3.14.0",
"Locale": "--",
"Binaries": {
"Browser": "148.0.7778.217",
"Node": "v24.13.0",
"uv": "0.10.6 (a91bcf268 2026-02-24)"
},
"Dependencies": {
"click": "8.3.0",
"docutils": "0.22.2",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.9",
"narwhals": "2.9.0",
"packaging": "25.0",
"psutil": "7.1.2",
"pygments": "2.19.2",
"pymdown-extensions": "10.21.3",
"pyyaml": "6.0.3",
"starlette": "0.48.0",
"tomlkit": "0.13.3",
"typing-extensions": "4.15.0",
"uvicorn": "0.38.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"loro": "1.10.3",
"pandas": "2.3.3",
"python-lsp-server": "1.14.0"
},
"Experimental Flags": {}
}
Describe the bug
Recently I've been working with pillow/PIL and I've run into a weird behavior. For reference, here is a quick rundown of what my code does:
marimo,PIL, and a few other libraries.mo.ui.file.PIL.Image.openon the selected image.Step 3 is where the first problem occurs. When I run my notebook in a sandboxed environment, it lists pillow in the dependencies, and seems to install it.
(correction: when pillow is manually removed from the dependencies, marimo offers to installimport PILdoes not failPillowandpillow. When that dialogue is accepted,PILdoes not fail to import, andpillowdoes fail (more on that in a second)). But when I reach step three, I get an error stating that "module 'PIL' has no attribute 'Image'".This is where the second strange behavior comes in. To fix the above error, I need to:
pillowinstead ofPIL,pillowis not installed (even though it is both in the dependencies list and manually installed,PILinstead ofpillow.Then everything works beautifully!
I suspect that this behavior might have something to do with PIL and pillow technically being different libraries/ the weirdness of how they are related. I have no idea why it offers to install both
Pillowandpillow, though. It's not fatal, but it is irritating that I have to go through this process every time I reopen that particular notebook.Will you submit a PR?
Environment
Details
Code to reproduce
No response