pip install google-cloud-pubsub fails install in docker container

前端 未结 3 841
南旧
南旧 2021-01-28 00:35

I am trying to use a pupsub emulator. It starts but when I try to use my python script I get the following error

ModuleNotFoundError: No module named \'google\'
         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-28 01:12

    It looks like in order to install that client, you need gcc installed in your docker container. It is trying to use the cc command to compile part of the library. Try installing the cython package prior to the google-cloud-pubsub package.

    It is also worth noting that version 0.24.0 of the Google Cloud Pub/Sub client library is three years old; it is now up to version 1.5.0. This dependency issue (along with many other things) may have been fixed somewhere in the meantime, so it might be worth updating to a more recent version.

提交回复
热议问题