fix AttributeError: 'module' object has no attribute '???'on windows python 2.7
This commit is contained in:
parent
766eb63f2f
commit
5a4871af05
@ -40,7 +40,8 @@ if '__all__' in vars():
|
||||
vars()['__all__'].append('contrib')
|
||||
|
||||
from tensorflow.python.platform import flags # pylint: disable=g-import-not-at-top
|
||||
app.flags = flags # pylint: disable=undefined-variable
|
||||
from tensorflow.python.platform import app # pylint: disable=g-import-not-at-top
|
||||
app.flags = flags
|
||||
|
||||
# Make sure directory containing top level submodules is in
|
||||
# the __path__ so that "from tensorflow.foo import bar" works.
|
||||
|
@ -1,6 +1,9 @@
|
||||
# python_sanity_test.py will complain about invalid or missing entries
|
||||
# problematic entries can be commented for temporary whitelisting
|
||||
tensorflow
|
||||
tensorflow/compiler
|
||||
tensorflow/compiler/xla
|
||||
tensorflow/compiler/xla/service
|
||||
tensorflow/core
|
||||
tensorflow/core/example
|
||||
tensorflow/core/framework
|
||||
|
@ -802,6 +802,7 @@ add_custom_command(
|
||||
# tensorflow/__init__.py depends on files generated in this step. So, remove it while
|
||||
# this step is running since the files aren't there yet.
|
||||
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/__init__.py
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/__init__.py
|
||||
|
||||
# Run create_python_api.py to generate API init files.
|
||||
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/tf_python "${PY_RUNTIME_ENV}" ${PYTHON_EXECUTABLE}
|
||||
|
Loading…
Reference in New Issue
Block a user