ImportError: No module named 'google'

前端 未结 10 579
刺人心
刺人心 2020-12-05 09:35

This is not a duplicate. My scenario is a bit different and I could not find a solution from similar posts here. I installed Python 3.5. I ran the pip install google comman

相关标签:
10条回答
  • 2020-12-05 10:04

    I faced the same issue, I was trying to import translate from google.cloud but kept getting same error.

    This is what I did

    1. pip install protobuf
    2. pip install google-cloud-translate

    and to install storage service from google google-cloud-storageshould be installed separately

    Ref - https://cloud.google.com/python/

    0 讨论(0)
  • 2020-12-05 10:10

    I had a similar import problem. I noticed that there was no __init__.py file in the root of the google package. So, I created an empty __init__.py and now the import works.

    0 讨论(0)
  • 2020-12-05 10:11
    1. Close Anaconda/Spyder
    2. Open command prompt and run the below command
    3. conda update --all
    4. Start the app again and this time it should work.

    Note - You need not have to uninstall/reinstall anything.

    0 讨论(0)
  • 2020-12-05 10:17

    I solved the problem in this way:

    1. sudo pip install conda
    2. pip install google

    and no more error.

    0 讨论(0)
提交回复
热议问题