When deploying a Python spaCy app to AWS Lambda, I get the following error in the deploy (see below). Why deploy using zappa? The zip file is 125MB compressed, so a direct upload from the aws-cli fails on space, and a transfer to S3 also fails because the uncompressed is more than 250MB.
My program, itself, is not doing any multithreading nor multiprocessing, and it is only using spaCy 2.0. I built and deployed on an EC2 AWS Linux t2.medium. What are the exact steps that get a round-trip answer from a spaCy AWS Lambda function?
Failure trace below:
[1520570028387] Failed to find library...right filename?
[1520570029826] [Errno 38] Function not implemented: OSError
Traceback (most recent call last):
File "/var/task/handler.py", line 509, in lambda_handler
return LambdaHandler.lambda_handler(event, context)
File "/var/task/handler.py", line 237, in lambda_handler
handler = cls()
File "/var/task/handler.py", line 129, in __init__
self.app_module = importlib.import_module(self.settings.APP_MODULE)
File "/var/lang/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "/tmp/spaciness/front.py", line 1, in <module>
import spacy
File "/tmp/spaciness/spacy/__init__.py", line 4, in <module>
from .cli.info import info as cli_info
File "/tmp/spaciness/spacy/cli/__init__.py", line 1, in <module>
from .download import download
File "/tmp/spaciness/spacy/cli/download.py", line 10, in <module>
from .link import link
File "/tmp/spaciness/spacy/cli/link.py", line 7, in <module>
from ..compat import symlink_to, path2str
File "/tmp/spaciness/spacy/compat.py", line 11, in <module>
from thinc.neural.util import copy_array
File "/tmp/spaciness/thinc/neural/__init__.py", line 1, in <module>
from ._classes.model import Model
File "/tmp/spaciness/thinc/neural/_classes/model.py", line 12, in <module>
from ..train import Trainer
File "/tmp/spaciness/thinc/neural/train.py", line 7, in <module>
from tqdm import tqdm
File "/tmp/spaciness/tqdm/__init__.py", line 1, in <module>
from ._tqdm import tqdm
File "/tmp/spaciness/tqdm/_tqdm.py", line 53, in <module>
mp_lock = mp.Lock() # multiprocessing lock
File "/var/lang/lib/python3.6/multiprocessing/context.py", line 67, in Lock
return Lock(ctx=self.get_context())
File "/var/lang/lib/python3.6/multiprocessing/synchronize.py", line 163, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
File "/var/lang/lib/python3.6/multiprocessing/synchronize.py", line 60, in __init__
unlink_now)
OSError: [Errno 38] Function not implemented
I could solve the issue with the following steps:
Increase memory size of the lambda function in the zappa_settings.json:
{
"dev": {
"memory_size": 3008,
}
}
I had to use a newer version of tqdm. Per default it was version 4.19 which had these issues as described here: https://github.com/tqdm/tqdm/issues/466
The described issue is fixed in a newer version. Its only to add tqdm to my requirements.txt and execute a pip upgrade of the package:
pip install -U tqdm
When I execute zappa deploy dev I get now the following message:
(tqdm 4.32.1 (/var/task/ve/lib/python3.6/site-packages), Requirement.parse('tqdm==4.19.1'), {'zappa'})
tqdm 4.19.1 was the default version of zappa and tqdm 4.32.1 is the new version containing the fix.
Related
I installed python-certifi-win32 package and after that, I am getting below error, when I import anything or pip install anything, the fail with the final error of PermissionError.
I tried rebooting the box. It didn't work. I am unable to uninstall the package as pip is erroring out too.
I am unable to figure out the exact reason why this error is happening. It doesn't seem to be code specific, seems related to the library I installed
PS C:\Users\visha\PycharmProjects\master_test_runner> pip install python-certifi-win32
Traceback (most recent call last):
File "C:\Users\visha\AppData\Local\Programs\Python\Python310\lib\importlib\_common.py", line 89, in _tempfile
os.write(fd, reader())
File "C:\Users\visha\AppData\Local\Programs\Python\Python310\lib\importlib\abc.py", line 371, in read_bytes
with self.open('rb') as strm:
File "C:\Users\visha\AppData\Local\Programs\Python\Python310\lib\importlib\_adapters.py", line 54, in open
raise ValueError()
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\visha\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\visha\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\Scripts\pip.exe\__main__.py", line 4, in <module>
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_internal\cli\main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 23, in <module>
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_internal\cli\parser.py", line 12, in <module>
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_internal\configuration.py", line 21, in <module>
from pip._internal.exceptions import (
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_internal\exceptions.py", line 8, in <module>
from pip._vendor.requests.models import Request, Response
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_vendor\requests\__init__.py", line 123, in <module>
from . import utils
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\pip\_vendor\requests\utils.py", line 25, in <module>
from . import certs
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\wrapt\importer.py", line 170, in exec_module
notify_module_loaded(module)
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\wrapt\importer.py", line 170, in exec_module
notify_module_loaded(module)
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\visha\PycharmProjects\GUI_Automation\venv\lib\site-packages\certifi\core.py", line 37, in where
_CACERT_PATH = str(_CACERT_CTX.__enter__())
File "C:\Users\visha\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in __enter__
return next(self.gen)
File "C:\Users\visha\AppData\Local\Programs\Python\Python310\lib\importlib\_common.py", line 95, in _tempfile
os.remove(raw_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\visha\\AppData\\Local\\Temp\\tmpy_tb8siv'
PS C:\Users\visha\PycharmProjects\master_test_runner>
I ran into the same issue today. I corrected it by removing two *.pth files that were created when I had installed python-certifi-win32. This prevents python-certifi-win32 from loading when python is run.
The files are listed below, and were located here:
C:\Users\<username>\AppData\Local\Programs\Python\Python310\Lib\site-packages
Files:
python-certifi-win32-init.pth
distutils-precedence.pth
Removing these files allowed me to install/uninstall other modules.
Andrew Leech, the author of python-certifi-win32, suggests to move on to his other project pip-system-certs (PyPI link). Drop-in replacing python-certifi-win32 with pip-system-certs solved all issues for me.
While the solution provided in this answer prevented the in the question mentioned error message for me too, it came with the side effect that my Python script didn't use the certificates in the Windows certificate store anymore, resulting again in SSL certificate errors - rendering the use of the library useless.
I'm trying to execute the TFX-Airflow tutorial (https://www.tensorflow.org/tfx/tutorials/tfx/airflow_workshop). When I try to connect to the server using airflow webserver -p 8008 it gives me the following error
Traceback (most recent call last):
File "/home/tester/.local/lib/python3.6/site-packages/airflow/models/dagbag.py", line 243, in process_file
m = imp.load_source(mod_name, filepath)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/tester/airflow/dags/taxi_pipeline_solution.py", line 26, in <module>
from tfx.components import CsvExampleGen
File "/home/tester/Airflow/tfx/tfx/components/__init__.py", line 17, in <module>
from tfx.components.bulk_inferrer.component import BulkInferrer
File "/home/tester/Airflow/tfx/tfx/components/bulk_inferrer/component.py", line 19, in <module>
from tfx.components.bulk_inferrer import executor
File "/home/tester/Airflow/tfx/tfx/components/bulk_inferrer/executor.py", line 26, in <module>
from tfx.dsl.components.base import base_executor
File "/home/tester/Airflow/tfx/tfx/dsl/components/base/base_executor.py", line 33, in <module>
from tfx.proto.orchestration import execution_result_pb2
ImportError: cannot import name 'execution_result_pb2'
My system is running on Ubuntu 20.04 and I have a virtual environment with all the dependencies installed as listed on the linked tutorial. I've used the 8008 port since I was getting an error with the 8080 port (that the connection is in use).
I read that it could be because the module is missing/circular dependent imports but I'm not sure which packages are responsible. I cannot find an execution_result_pb2.py file on my system (assuming it is a file). Does anyone know how to solve this?
Installed dagster for the first time in a conda environment and tried to run the airline demo as described here. The following are the steps I followed.
conda env create -n dagster python=3.7
conda activate dagster
pip install dagster dagit
git clone git#github.com/dagster-io/dagster.git
cd dagster/examples
pip install -e '[.full]'
docker-compose up -d
cd dagster_examples/airline_demo
dagit
I then get the following stack trace ending in the 'dagster.core.types.runtime' is not a package message:
Loading repository...
Traceback (most recent call last):
File "/Users/timrozmajzl/miniconda3/envs/dagster/bin/dagit-cli", line 8, in <module>
sys.exit(main())
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagit/cli.py", line 110, in main
cli = create_dagit_cli()
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagit/cli.py", line 21, in create_dagit_cli
return ui(auto_envvar_prefix='DAGIT') # pylint: disable=no-value-for-parameter
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagit/cli.py", line 72, in ui
host_dagit_ui(handle, host, port, storage_fallback, reload_trigger)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagit/cli.py", line 81, in host_dagit_ui
app = create_app(handle, instance, reloader)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagit/app.py", line 160, in create_app
version=__version__,
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagster_graphql/implementation/context.py", line 17, in __init__
self.repository_definition = self.get_handle().build_repository_definition()
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagster/core/definitions/handle.py", line 392, in build_repository_definition
obj = self.entrypoint.perform_load()
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagster/core/definitions/handle.py", line 445, in entrypoint
return self.data.get_repository_entrypoint(from_handle=self)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagster/core/definitions/handle.py", line 522, in get_repository_entrypoint
return LoaderEntrypoint.from_yaml(self.repository_yaml, from_handle=from_handle)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagster/core/definitions/handle.py", line 175, in from_yaml
return LoaderEntrypoint.from_module_target(module_name, fn_name, from_handle)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/site-packages/dagster/core/definitions/handle.py", line 161, in from_module_target
module = importlib.import_module(module_name)
File "/Users/timrozmajzl/miniconda3/envs/dagster/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/timrozmajzl/Projects/dagster/dagster/examples/dagster_examples/airline_demo/repository.py", line 3, in <module>
from .pipelines import define_airline_demo_ingest_pipeline, define_airline_demo_warehouse_pipeline
File "/Users/timrozmajzl/Projects/dagster/dagster/examples/dagster_examples/airline_demo/pipelines.py", line 14, in <module>
from .resources import postgres_db_info_resource, redshift_db_info_resource
File "/Users/timrozmajzl/Projects/dagster/dagster/examples/dagster_examples/airline_demo/resources.py", line 3, in <module>
from .types import DbInfo
File "/Users/timrozmajzl/Projects/dagster/dagster/examples/dagster_examples/airline_demo/types.py", line 8, in <module>
from dagster.core.types.runtime.runtime_type import create_string_type
ModuleNotFoundError: No module named 'dagster.core.types.runtime.runtime_type'; 'dagster.core.types.runtime' is not a package
Thanks for reporting this issue! After some digging, it seems like this commit was not compatible with the latest release of dagster (at the time) which caused the error.
Re-running this workflow with the most recent dagster master and dependencies should resolve this. Opening an issue here to track a more long-term fix.
More details: In this commit, 'create_string_type' is introduced to both 'examples/dagster_examples/airline_demo/types.py' and 'python_modules/dagster/dagster/core/types/runtime/runtime_type.py'. However, based on the commands pasted in the question and present in the airline demo steps, airline_demo pipeline was running the tip of master (which contained 'create_string_type') with an older dagster package (from the latest release, which did not contain 'create_string_type').
During migration from Django1.5 to Django2.1.7 we are facing an implicit import error in library function when trying to start server.
Traceback (most recent call last):
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x10945f950>
Traceback (most recent call last):
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/utils/autoreload.py", line 248, in raise_last_exception
raise _exception[1]
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/core/management/__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/apps/registry.py", line 89, in populate
app_config = AppConfig.create(entry)
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/Users/MAK/Envs/lifemed3/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/json_field/__init__.py", line 1, in <module>
from json_field.fields import JSONField
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/json_field/fields.py", line 4, in <module>
from json_field.forms import JSONFormField
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/json_field/forms.py", line 5, in <module>
from django.forms import fields, util
ImportError: cannot import name 'util' from 'django.forms' (/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/forms/__init__.py)
We have already check this answer about circular dependency, but as it was in code level and was easily solvable, but in terms of library what would be the best way to solve this?
FYI: we are moving to python3.7 with Django2.1.7 from python 2.7 and django 1.5.5
UPDATE (Solved)
According to mfrackowiak's answer below we have to fork their repo, applied patch for the support and install from the changed version. then it worked for me
As it seems that the package is unmaintained for a long time, the best way to deal with this error would be either look for alternatives or just fork the repo and update it yourself so it would still work (might be easier than adjusting codebase for another library).
I found these two packages:
If this is the package you're using django-json-field, then look at the last release which was in 2014 so i'm pretty sure this package is incompatible with Django 2.0
If jsonfield is your package then even they don't have support for Django 2.0. They have 1.8 to 1.11
Post in your code what you intended to do using that package then i might be able to give yo a custom solution or package which actually supports 2.0 and does the work.
I have a python script that works without any errors on my desktop. When I try to run it on my raspberry pi, I encounter an error.
To install tensorflow on the raspberry pi for python 3.5, I followed this tutorial: https://petewarden.com/2017/08/20/cross-compiling-tensorflow-for-the-raspberry-pi/ There is no offical binary for tensorflow and python 3.5 and I had errors when I tried to compile it myself. The tutorial suggest to just install tensorflow from the Python 3.4 binary.
If you’re running Python 3.5, you can use the Python 3.4 wheel but with a
slight change to the file name, since that encodes the version. You
will see a couple of warnings every time you import tensorflow, but it
should work correctly.
Here is the error I am encountering:
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: compiletime version 3.4 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.5
return f(*args, **kwds)
/usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: builtins.type size changed, may indicate binary incompatibility. Expected 432, got 412
return f(*args, **kwds)
Traceback (most recent call last):
File "run.py", line 93, in <module>
model = FastPredict(tf.contrib.learn.Estimator(model_fn=convolutional_neural_network, model_dir="tmp"))
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/python/util/lazy_loader.py", line 53, in __getattr__
module = self._load()
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/python/util/lazy_loader.py", line 42, in _load
module = importlib.import_module(self.__name__)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/contrib/__init__.py", line 82, in <module>
from tensorflow.contrib.eager.python import tfe as eager
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/contrib/eager/python/tfe.py", line 76, in <module>
from tensorflow.contrib.eager.python.datasets import Iterator
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/contrib/eager/python/datasets.py", line 23, in <module>
from tensorflow.contrib.data.python.ops import prefetching_ops
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/contrib/data/python/ops/prefetching_ops.py", line 25, in <module>
resource_loader.get_path_to_datafile("../../_prefetching_ops.so"))
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/contrib/util/loader.py", line 55, in load_op_library
ret = load_library.load_op_library(path)
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
File "/home/pi/.local/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/pi/.local/lib/python3.5/site-packages/tensorflow/contrib/data/python/ops/../../_prefetching_ops.so: undefined symbol: _ZN6google8protobuf8internal26fixed_address_empty_stringE
Line 93 attempts to create an Estimator which causes the error.
tf.contrib.learn.Estimator(model_fn=convolutional_neural_network, model_dir="tmp")
I found a similar error on github but it was no help: https://github.com/tensorflow/serving/issues/684
I installed an older build. It doesn't cause this error. http://ci.tensorflow.org/view/Nightly/job/nightly-pi/78/artifact/output-artifacts/tensorflow-1.3.0-cp27-none-any.whl