https://pantsbuild.org/ logo
#general
Title
# general
i

incalculable-hydrogen-44003

09/20/2022, 9:55 PM
Hi guys. Wondering if anybody else has been able to run
shell_plus --notebook
for their Django app with pants. We are having a lot of issues with dependencies doing it.
h

happy-kitchen-89482

09/22/2022, 9:08 PM
What are the issues? Django notoriously does a lot of dynamic importing by name, rather than statically via
import
statements. So Pants often cannot infer those dependencies, and you must add them to the BUILD files.
Could that be related?
i

incalculable-hydrogen-44003

09/22/2022, 9:10 PM
Ya. We determined the issue to be jupyter running outside of the sandbox
So there really wasn't a good solution for this besides again wrapping the entire app in another docker container and installing all the requirements using pip
h

happy-kitchen-89482

09/22/2022, 9:33 PM
huh, having an explicit dep on jupyter didn’t work?
i

incalculable-hydrogen-44003

09/22/2022, 9:33 PM
nope. I think this is an instance of another strange Django hack
h

happy-kitchen-89482

09/22/2022, 9:35 PM
Some day (hopefully soon) I will write a proper Pants plugin for Django
That understands the dep magic
5 Views