Google Cloud SDK - no module named ipaddr

Today, our development containers started throwing and mistakenly launching the standard on-premises App Engine (GAE) development environment from the Google Cloud SDK.

ERROR 2017-12-15 09:38:37,766 http_runtime.py:396] bad runtime process port [''] Traceback (most recent call last): File "/opt/google-cloud-sdk/platform/google_appengine/_php_runtime.py", line 103, in <module> _run_file(__file__, globals()) File "/opt/google-cloud-sdk/platform/google_appengine/_php_runtime.py", line 97, in _run_file execfile(_PATHS.script_file(script_name), globals_) File "/opt/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php/runtime/runtime.py", line 39, in <module> from google.appengine.tools.devappserver2 import wsgi_server File "/opt/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 34, in <module> import ipaddr ImportError: No module named ipaddr 

It looks like this was caused by an upgrade to the latest SDK, which happened automatically.

+5
source share
4 answers

ipaddr.py for macOS, copy the ipaddr.py file to <google-cloud-sdk>/platform/google_appengine

+7
source

In Ubuntu 14.04, which we use to match the GAE version of PHP 5.5, the python module they are trying to use is not installed by default.

We installed it using

 # apt install python-ipaddr 

This is similar to the function they introduced to check the host to prevent DNS replay attacks.

+2
source

On Windows 10, I copied the ipaddr.py file from https://github.com/google/ipaddr-py to the Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\Lib\ and it worked.

Not an experienced Python encoder, so I'm not sure if this is the best place to host the missing ipaddr.py file, but it works.

+1
source

This happened after updating GoogleAppEngine-1.9.65 in my Windows 7, and it seems that the ipaddr.py file is missing in the C: \ Program Files (x86) \ Google \ google_appengine \ lib \ ipaddr \ ipaddr folder.

I had to download ipaddr-2.2.0.tar.gz , then unzip it and run the following command to install it.

 python setup.py install 

Hope this helps.

0
source

Source: https://habr.com/ru/post/1274091/


All Articles