prototipando / google-cloud-sdk

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

Google Cloud SDK - ImportError: No module named gcloud #141

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
start Python shell. import gclcoud statement always fails with the following 
error message: ImportError: No module named gcloud

What is the expected output? What do you see instead?
No error message should be returned. The module should be found.

What is the output of 'gcloud info'?
[charles@black ~]$ gcloud info
Google Cloud SDK [0.9.58]

Platform: [Linux, x86_64]
Python Version: [2.7.5 (default, Apr 10 2015, 08:09:05)  [GCC 4.8.3 20140911 
(Red Hat 4.8.3-7)]]
Site Packages: [Enabled]

Installation Root: [/home/charles/google-cloud-sdk]
Installed Components:
  core: [2015.04.29]
  core-nix: [2014.10.20]
  compute: [2015.04.29]
  gcloud: [2015.04.29]
  gsutil-nix: [4.6]
  gcloud-extensions-linux-x86_64: [0.15.0]
  gsutil: [4.12]
  bq: [2.0.18]
  dns: [2015.04.29]
  sql: [2015.04.09]
  gcutil: [1.16.5]
  gcutil-nix: [1.16.5]
  bq-nix: [2.0.18]
System PATH: 
[/home/charles/google-cloud-sdk/bin:/usr/lib64/qt-3.3/bin:.:/opt/spark-1.1.0-bin
-hadoop2.4/bin:.:/opt/spark-1.1.0-bin-hadoop2.4/sbin:.:/usr/local/go/bin:/usr/lo
cal/bin:/usr/bin:/bin:/usr/games:/opt/java/jdk1.8.0_20/bin:/opt/java/jdk1.8.0_20
/jre/bin:/usr/local/apache-maven/apache-maven-3.0.5/bin:/usr/local/findbugs/bin:
/opt/apache-ant-1.9.1/bin:/usr/local/apache-ivy/bin:/opt/sbt/bin:/opt/eclipse:/o
pt/aws-java-sdk/1.8.10.2/lib:/opt/hadoop-2.5.1/bin:/opt/hadoop-2.5.1/sbin:/opt/h
adoop-2.5.1/bin:/opt/hadoop-2.5.1/sbin:/opt/apache-hive-0.13.0-bin/bin:/opt/zook
eeper-3.4.6/bin:/opt/scala-2.11.1/bin:/opt/kafka_2.10-0.8.1.1/bin:/opt/akka-2.3.
3/bin:/opt/neo4j-community-2.1.4/bin:/usr/pgsql-9.2/bin:/opt/elasticsearch-1.3.4
/bin.:/opt/groovy-2.3.2/bin:/usr/local/sbin:/usr/sbin:/opt/db-derby-10.10.1.1-bi
n/bin:/opt/hadoop-2.5.1/bin:/opt/hadoop-2.5.1/sbin:/opt/hadoop-2.5.1/bin:/opt/ha
doop-2.5.1/sbin:/usr/local/apache-maven/apache-maven-3.0.5/bin:/usr/local/findbu
gs/bin:/opt/apache-ant-1.9.1/bin:/usr/local/apache-ivy/bin:/opt/sbt/bin:/opt/ecl
ipse:/opt/aws-java-sdk/1.8.10.2/lib:/opt/hadoop-2.5.1/bin:/opt/hadoop-2.5.1/sbin
:/opt/hadoop-2.5.1/bin:/opt/hadoop-2.5.1/sbin:/opt/apache-hive-0.13.0-bin/bin:/o
pt/zookeeper-3.4.6/bin:/opt/scala-2.11.5/bin:/opt/kafka_2.10-0.8.1.1/bin:/opt/ak
ka-2.3.3_2.11/bin:/opt/neo4j-community-2.1.4/bin:/usr/pgsql-9.2/bin:/opt/elastic
search-1.3.4/bin:/home/charles/google_appengine/:/home/charles/.local/bin:/home/
charles/bin:/opt/java/jdk1.8.0_20/bin:/opt/java/jdk1.8.0_20/jre/bin:/opt/db-derb
y-10.10.1.1-bin/bin:/opt/hadoop-2.5.1/bin:/opt/hadoop-2.5.1/sbin:/opt/hadoop-2.5
.1/bin:/opt/hadoop-2.5.1/sbin:/usr/local/apache-maven/apache-maven-3.0.5/bin:/us
r/local/findbugs/bin:/opt/apache-ant-1.9.1/bin:/usr/local/apache-ivy/bin:/opt/sb
t/bin:/opt/eclipse:/opt/aws-java-sdk/1.8.10.2/lib:/opt/hadoop-2.5.1/bin:/opt/had
oop-2.5.1/sbin:/opt/hadoop-2.5.1/bin:/opt/hadoop-2.5.1/sbin:/opt/apache-hive-0.1
3.0-bin/bin:/opt/zookeeper-3.4.6/bin:/opt/scala-2.11.5/bin:/opt/kafka_2.10-0.8.1
.1/bin:/opt/akka-2.3.3_2.11/bin:/opt/neo4j-community-2.1.4/bin:/usr/pgsql-9.2/bi
n:/opt/elasticsearch-1.3.4/bin:/usr/lib/python2.7/site-packages:/home/charles/go
ogle-cloud-sdkgoogle-cloud-sdk/bin:/home/charles/google-cloud-sdkgoogle-cloud-sd
k/lib:/home/charles/google-cloud-sdkgoogle-cloud-sdk/lib/googlecloudsdk:/home/ch
arles/google-cloud-sdkgoogle-cloud-sdk/lib/googlecloudsdk/gcloud:/home/charles/g
oogle-cloud-sdkgoogle-cloud-sdk/lib/googlecloudapis:/home/charles/google_appengi
ne/]
Cloud SDK on PATH: [True]

Installation Properties: [/home/charles/google-cloud-sdk/properties]
User Config Directory: [/home/charles/.config/gcloud]
User Properties: [/home/charles/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [cclifford@archipelagois.com]
Project: [None]

Current Properties:
  [core]
    account: [cclifford@archipelagois.com]
    disable_usage_reporting: [False]

Logs Directory: [/home/charles/.config/gcloud/logs]
Last Log File: 
[/home/charles/.config/gcloud/logs/2015.05.05/18.34.27.759888.log]

Please provide any additional information below.
Attempts to use pip to install gcloud fails, see below:

sudo pip install gcloud
[sudo] password for charles: 
Collecting gcloud
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_
.py:79: InsecurePlatformWarning: A true SSLContext object is not available. 
This prevents urllib3 from configuring SSL appropriately and may cause certain 
SSL connections to fail. For more information, see 
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached gcloud-0.5.0.tar.gz
Collecting google-apitools (from gcloud)
  Using cached google-apitools-0.4.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): httplib2 in 
/usr/lib/python2.7/site-packages (from gcloud)
Requirement already satisfied (use --upgrade to upgrade): oauth2client>=1.4.6 
in /usr/lib/python2.7/site-packages (from gcloud)
Collecting protobuf>=2.5.0 (from gcloud)
  Using cached protobuf-2.6.1.tar.gz
    Complete output from command python setup.py egg_info:

    Installed /tmp/pip-build-KnPK26/protobuf/.eggs/google_apputils-0.4.2-py2.7.egg
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-KnPK26/protobuf/setup.py", line 200, in <module>
        "Protocol Buffers are Google's data interchange format.",
      File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 265, in __init__
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 310, in fetch_build_eggs
      File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 830, in resolve
      File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1068, in best_match
      File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 705, in find
    pkg_resources.VersionConflict: (pytz 2012d (/usr/lib/python2.7/site-packages), Requirement.parse('pytz>=2010'))

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-KnPK26/protobuf

Original issue reported on code.google.com by ccliff...@archipelagois.com on 6 May 2015 at 12:49

GoogleCodeExporter commented 8 years ago
I've fixed this problem. Please close this item.

Original comment by ccliff...@archipelagois.com on 6 May 2015 at 1:52

GoogleCodeExporter commented 8 years ago

Original comment by z...@google.com on 3 Jun 2015 at 3:45

GoogleCodeExporter commented 8 years ago
I fixed it by :
installing protobuf 3.0.0a3 ( easy-install protobuf-3.0.0a3-py2.7.egg )
downloaded gcloud-0.7.1.tar.gz 
removed the line "protobuf == 3.0.0-alpha-1'" in setup.py
python install setup.py

Original comment by jan.vani...@gmail.com on 31 Aug 2015 at 11:07

GoogleCodeExporter commented 8 years ago
Note that (somewhat confusingly), this is the issue tracker for the Google 
Cloud SDK, which includes the gcloud command-line tool (incidentally written in 
Python), and NOT the issue tracker for gcloud-python, the Python client library 
for the Google Cloud Platform API.

For that, please file issues here: 
https://github.com/GoogleCloudPlatform/gcloud-python

Original comment by z...@google.com on 1 Sep 2015 at 3:04