Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named tensorflow.python.platform #18856

Closed
dinglong1020 opened this issue Apr 25, 2018 · 4 comments
Closed

No module named tensorflow.python.platform #18856

dinglong1020 opened this issue Apr 25, 2018 · 4 comments
Assignees
Labels
type:build/install Build and install issues

Comments

@dinglong1020
Copy link

dinglong1020 commented Apr 25, 2018

environment: ubuntu 1604, python 2.7

sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/   https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-1.7.0-cp27-none-linux_x86_64.whl

there is error, but why???

ubuntu@vm:~/code/tensorflow$ python tensorflow/python/tools/freeze_graph.py --input_graph=/tmp/mobilenet_v1_1.0_224.pb --input_binary=true --output_graph=/tmp/frozen_mobilenet_v1_224.pb --output_node_names=MobilenetV1/Predictions/Reshape_1
Traceback (most recent call last):
  File "tensorflow/python/tools/freeze_graph.py", line 45, in <module>
    from tensorflow.core.framework import graph_pb2
  File "/home/ubuntu/code/tensorflow/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/home/ubuntu/code/tensorflow/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/ubuntu/code/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 25, in <module>
    from tensorflow.python.platform import self_check
ImportError: No module named platform
@tensorflowbutler tensorflowbutler added the stat:awaiting response Status - Awaiting response from author label Apr 25, 2018
@tensorflowbutler
Copy link
Member

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

@dinglong1020
Copy link
Author

thanks, I found the solution, that I need to run command at the $(source_code_root)/tensorflow/tensorflow folder

@dinglong1020
Copy link
Author

and my command need to modified as:
python -m tensorflow.python.tools.freeze_graph
--input_graph=/tmp/mobilenet_v1_1.0_224.pb
--input_checkpoint=/tmp/checkpoints/mobilenet_v1_1.0_224.ckpt
--input_binary=true
--output_graph=/tmp/mobilenet_v1_1.0_224_frozen.pb
--output_node_names=MobilenetV1/Predictions/Reshape_1

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Apr 26, 2018
@drpngx drpngx added the type:build/install Build and install issues label Apr 26, 2018
@drpngx
Copy link
Contributor

drpngx commented Apr 26, 2018

Glad you figured it out!

@drpngx drpngx closed this as completed Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

3 participants