that? Was this already installed in the execution environment? In that case Well, if you think you only need to pip once and run it, it can be very heavy. The following is an example, and if you try to install Janome many times (perhaps not too often), it will be very heavy. Certainly something in mecab.
The code I made to make it work as a shortcut if it is already installed at that time. I confirmed that it works with colaboratory, but it is unconfirmed whether it works with ordinary jupyter notebook / Lab.
installed=!pip list
if "Janome" in "|".join(installed):
pass
else:
!pip install janome==0.3.6
Recommended Posts