Quentin123345 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gcloud DOES NOT work with stock python in OSX 10.10.5 #434

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please provide any additional information below.
THIS IS NOT a python installation issue.  I can import the 'copy' module from 
any other python program, but if fails horribly with gcloud.  I'd like to move 
all my web services to google, but this is just a really bad first impression 
with google cloud.

What steps will reproduce the problem?
install gcloud on OSX 10.10.5, and run gcloud init

What is the expected output? What do you see instead?
I expect the program not to crash.  I see the output from the next question

What is the output of 'gcloud info'?
Michaels-MacBook-Pro:google-cloud-sdk mfisher$ bin/gcloud info
Traceback (most recent call last):
  File "/Users/mfisher/Downloads/google-cloud-sdk/./lib/gcloud.py", line 21, in <module>
    main()
  File "/Users/mfisher/Downloads/google-cloud-sdk/./lib/gcloud.py", line 16, in main
    import googlecloudsdk.gcloud_main
  File "/Users/mfisher/Downloads/google-cloud-sdk/lib/googlecloudsdk/gcloud_main.py", line 14, in <module>
    from googlecloudsdk.calliope import base
  File "/Users/mfisher/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/base.py", line 8, in <module>
    from googlecloudsdk.calliope import usage_text
  File "/Users/mfisher/Downloads/google-cloud-sdk/lib/googlecloudsdk/calliope/usage_text.py", line 6, in <module>
    import argparse
  File "/Users/mfisher/Downloads/google-cloud-sdk/./lib/third_party/argparse/__init__.py", line 85, in <module>
    import copy as _copy
ImportError: No module named copy

Original issue reported on code.google.com by mfis...@kushview.net on 19 Dec 2015 at 8:38

GoogleCodeExporter commented 8 years ago
Thanks for reporting this, and I'm sorry that you're running into this issue. 

What version is the stock python on 10.5.5?

Original comment by rdayal@google.com on 19 Dec 2015 at 9:39

GoogleCodeExporter commented 8 years ago

Original comment by rdayal@google.com on 19 Dec 2015 at 9:39

GoogleCodeExporter commented 8 years ago

Original comment by rdayal@google.com on 19 Dec 2015 at 9:43

GoogleCodeExporter commented 8 years ago
If this is Python 2.6, that might be the problem...

Original comment by rdayal@google.com on 19 Dec 2015 at 9:44

GoogleCodeExporter commented 8 years ago
Thanks for the quick reply.

This is OSX Yosemite (10.10.5) and the included python version is 2.7.10

Original comment by mfis...@kushview.net on 19 Dec 2015 at 10:40

GoogleCodeExporter commented 8 years ago
I found what the problem is.  I also have the AWS command line tools.  the 
bin/gcloud shell script is detecting if python2 is present and using it over 
/usr/bin/python.   The python2 binary in my case is provided by the AWS SDK.

the gcloud script should probably inspect `/usr/bin/python --version` before 
checking python2 in the if/else block ~line #72 in the script.

So, sorry for any confusion, Apple's python is all good.  I would however note 
this somewhere on the gcloud installation instructions page that conflicts can 
and will occur if AWS cli is also installed on mac, or push a patch that 
ensures usage of Apple's python when valid and running on a darwin system.

Original comment by mfis...@kushview.net on 19 Dec 2015 at 10:57

GoogleCodeExporter commented 8 years ago
Glad you figured it out. We'll work on the error messaging here, and add 
relevant information about Python installations to our home page.

In the future, please only report issues in one location. This lets us provide 
you with more focused support.

Original comment by z...@google.com on 20 Dec 2015 at 3:03