The pyinstaller complains the error with the following line:
from gcloud .pubsub .client import Client
The module is installed correctly in /usr/local/lib/python2.7/dist-packages. I run setup.py (build/ install) in addition pip install --upgrade cloud too.
Traceback (most recent call last ):
File "<string>" , line 267 , in < module >
File "/usr/local/lib/python2.7/dist-packages/PyInstaller-2.1.1dev_-py2.7.egg/PyInstaller/loader/pyi_importers.py" , line 271 , in load_module
exec (bytecode , module .__dict__ )
File "/home/mtwu/gce/cloudn/cloudx-local/gce/gce_pubsub.py" , line 6 , in < module >
File "/usr/local/lib/python2.7/dist-packages/PyInstaller-2.1.1dev_-py2.7.egg/PyInstaller/loader/pyi_importers.py" , line 271 , in load_module
exec (bytecode , module .__dict__ )
File "/home/mtwu/gce/cloudn/install/build/cloudx_cli/out00-PYZ.pyz/gcloud" , line 19 , in < module >
File "/home/mtwu/gce/cloudn/install/build/cloudx_cli/out00-PYZ.pyz/pkg_resources" , line 551 , in get_distribution
The following import will cause the following pyinstaller error .
from gcloud .pubsub .client import Client
File "/home/mtwu/gce/cloudn/install/build/cloudx_cli/out00-PYZ.pyz/pkg_resources" , line 431 , in get_provider
File "/home/mtwu/gce/cloudn/install/build/cloudx_cli/out00-PYZ.pyz/pkg_resources" , line 952 , in require
File "/home/mtwu/gce/cloudn/install/build/cloudx_cli/out00-PYZ.pyz/pkg_resources" , line 839 , in resolve
pkg_resources .DistributionNotFound : The 'gcloud' distribution was not found and is required by the application
mtwu@ubuntu:/usr/local/lib/python2.7/dist-packages$ ls -l gcloud
total 360
drwxr-sr-x 2 root staff 4096 Oct 16 09:13 bigquery
drwxr-sr-x 3 root staff 4096 Oct 16 09:13 bigtable
-rw-r--r-- 1 root staff 7564 Oct 16 09:13 client.py
-rw-r--r-- 1 root staff 8038 Oct 16 09:13 client.pyc
-rw-r--r-- 1 root staff 12949 Oct 16 09:13 connection.py
-rw-r--r-- 1 root staff 12304 Oct 16 09:13 connection.pyc
-rw-r--r-- 1 root staff 14075 Oct 16 09:13 credentials.py
-rw-r--r-- 1 root staff 13661 Oct 16 09:13 credentials.pyc
drwxr-sr-x 3 root staff 4096 Oct 16 09:13 datastore
-rw-r--r-- 1 root staff 4036 Oct 16 09:13 demo.py
-rw-r--r-- 1 root staff 4010 Oct 16 09:13 demo.pyc
drwxr-sr-x 2 root staff 4096 Oct 16 09:13 dns
-rw-r--r-- 1 root staff 1418 Oct 16 09:13 environment_vars.py
-rw-r--r-- 1 root staff 647 Oct 16 09:13 environment_vars.pyc
-rw-r--r-- 1 root staff 5819 Oct 16 09:13 exceptions.py
-rw-r--r-- 1 root staff 9026 Oct 16 09:13 exceptions.pyc
-rw-r--r-- 1 root staff 8048 Oct 16 09:13 _helpers.py
-rw-r--r-- 1 root staff 10032 Oct 16 09:13 _helpers.pyc
-rw-r--r-- 1 root staff 736 Oct 16 09:13 __init__.py
-rw-r--r-- 1 root staff 333 Oct 16 09:13 __init__.pyc
-rw-r--r-- 1 root staff 4957 Oct 16 09:13 iterator.py
-rw-r--r-- 1 root staff 5210 Oct 16 09:13 iterator.pyc
drwxr-sr-x 2 root staff 4096 Oct 16 09:13 pubsub
drwxr-sr-x 2 root staff 4096 Oct 16 09:13 resource_manager
drwxr-sr-x 2 root staff 4096 Oct 16 09:13 search
drwxr-sr-x 3 root staff 4096 Oct 16 09:13 storage
-rw-r--r-- 1 root staff 7021 Oct 16 09:13 test_client.py
-rw-r--r-- 1 root staff 9101 Oct 16 09:13 test_client.pyc
-rw-r--r-- 1 root staff 13090 Oct 16 09:13 test_connection.py
-rw-r--r-- 1 root staff 15451 Oct 16 09:13 test_connection.pyc
-rw-r--r-- 1 root staff 22622 Oct 16 09:13 test_credentials.py
-rw-r--r-- 1 root staff 28116 Oct 16 09:13 test_credentials.pyc
-rw-r--r-- 1 root staff 2844 Oct 16 09:13 test_exceptions.py
-rw-r--r-- 1 root staff 3664 Oct 16 09:13 test_exceptions.pyc
-rw-r--r-- 1 root staff 12177 Oct 16 09:13 test__helpers.py
-rw-r--r-- 1 root staff 19874 Oct 16 09:13 test__helpers.pyc
-rw-r--r-- 1 root staff 1143 Oct 16 09:13 _testing.py
-rw-r--r-- 1 root staff 1212 Oct 16 09:13 _testing.pyc
-rw-r--r-- 1 root staff 6781 Oct 16 09:13 test_iterator.py
-rw-r--r-- 1 root staff 8076 Oct 16 09:13 test_iterator.pyc Reactions are currently unavailable
The pyinstaller complains the error with the following line:
The module is installed correctly in
/usr/local/lib/python2.7/dist-packages. I runsetup.py(build/install) in additionpip install --upgrade cloudtoo.