I’m developing a Python package. I used Poetry to set up my development environment; I intend to distribute my code through PyPI. One of my dependencies requires ipywidgets<7.7.2, as documented here. Due to a bug (mentioned here), ipykernel must be reinstalled after ipywidgets is installed.
This SO answer says that developers can’t specify the order that Poetry installs packages. Is this still true? If so, what is the simplest way to get users to re-install ipykernel after installing ipywidgets?
I could add something to my documentation telling users to run pip uninstall ipykernel then pip install ipykernel. But this seems like it would trip up unwary users?
>Solution :
-
Assuming you have activated Poetry virtual environment with
poetry shellcommand -
When you run
pip installafterpoetry install, it unconditionally overwrites any packages installed the virtual environment