KevinGG commented on issue #23599:
URL: https://github.com/apache/beam/issues/23599#issuecomment-1279339120

   I know what went wrong. The example needs to be updated. Always use `!pip 
install` in Colab, not `%pip install`.
   
   
   Note that `%pip` is a notebook magic (not a shell cmd) that only works on 
Jupyter notebook runtimes that allows multiple kernel selections. When `%pip 
install`, it installs the dependency to the venv of the connected IPython 
kernel.
   
   This is required in products such as Beam Notebooks on Google Cloud. Because 
the notebook runtime env is separated from the IPython kernel env.
   
   Colab doesn't have this separation. Its runtime env is also its IPython 
kernel env. `%pip` didn't work with CoLab in the past. I don't know why it's 
"working" now. But Colab as a notebook frontend doesn't integrate with this 
magic or Jupyter architecture well and has messed up with the package 
management.
   
   Instead, use `!pip` that is a shell cmd that always works in Colab as it's a 
single kernel notebook runtime.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to