Mac gcloud install ImportError: No module named __future__

后端 未结 3 1637
难免孤独
难免孤独 2021-01-25 08:28

When installing gcloud for mac I get this error when I run the install.sh command according to docs here:

Traceback (most recent call last):
  File          


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-25 08:37

    The script uses the -S command-line switch, which disables loading the site module on start-up.

    However, it is a custom dedicated site module installed in a virtualenv that makes a virtualenv work. As such, the -S switch and virtualenvs are incompatible, with -S set fundamental imports such as from __future__ break down entirely.

    You can either remove the -S switch from the install.bat command or use a wrapper script to strip it from the command line as you call your real virtualenv Python.

提交回复
热议问题