I write libraries in an ide and give examples in a notebook. Working in a cross platform environment is painful when gpu stuff doesn't work out of the box for everyone or when you need a way to poorly spread work across a compute cluster instead of using your local machine.
Actually, I hate python now because of this. I would kill for a proper tool for implementing requirements.txt like package.json(yarn) or pom.xml(maven) that worked on jupyter by defining a base image similar to docker. Pip+virtualenv just seems like a half-attempt