Repository navigation
No module named tensorflow.python.platform #36
Description
Activity
For this to work, you'll have to install the PIP package. You can either download the pre-built package, or build from source by following the instructions here: http://tensorflow.org/get_started/os_setup.md#create-pip
@mrry Thank you. When I run
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkgMon Nov 9 15:34:49 EST 2015 : === Using tmpdir: /tmp/tmp.itHpiLkuJI
/tmp/tmp.itHpiLkuJI ~/packages/tensorflow
Mon Nov 9 15:34:49 EST 2015 : === Building wheel
Traceback (most recent call last):
File "setup.py", line 77, in
keywords='tensorflow tensor machine learning',
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "build/bdist.linux-x86_64/egg/setuptools/command/sdist.py", line 48, in run
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 970, in run_command
cmd_obj = self.get_command_obj(command)
File "/usr/lib/python2.7/distutils/dist.py", line 845, in get_command_obj
klass = self.get_command_class(command)
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 430, in get_command_class
File "/usr/lib/python2.7/distutils/dist.py", line 815, in get_command_class
import (module_name)
File "/usr/lib/python2.7/distutils/command/check.py", line 13, in
from docutils.utils import Reporter
File "/home/xeraph/virtualenv/v1/local/lib/python2.7/site-packages/docutils/utils/init.py", line 20, in
import docutils.io
File "/home/xeraph/virtualenv/v1/local/lib/python2.7/site-packages/docutils/io.py", line 18, in
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/home/xeraph/virtualenv/v1/local/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 47, in
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/home/xeraph/virtualenv/v1/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/home/xeraph/virtualenv/v1/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8Any idea?
Can you try the following?
export LC_ALL=en_us.UTF-8 export LANG=en_us.UTF-8 bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
@mrry it works, Thx.
- added a commit that references this issue
on Mar 9, 2016 I run into the same problem. I use Mac OS X in Japanese.
export LC_ALL=en_us.UTF-8 export LANG=en_us.UTF-8Solved it :)
But I think en_us.UTF-8 should not be assumed by default on installation.
- added a commit that references this issue
on Jun 20, 2017 - added a commit that references this issue
on Sep 28, 2017 export LC_ALL=en_us.UTF-8
export LANG=en_us.UTF-8
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkgit works, but I dont known why.
- added a commit that references this issue
on Dec 6, 2019 - added a commit that references this issue
on Feb 1, 2021 - added a commit that references this issue
on Mar 6, 2023 - added a commit that references this issue
on Mar 23, 2023 - added 5 commits that reference this issue
on Apr 9, 2025
when running
python tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py
get the following error:
Traceback (most recent call last):
File "tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py", line 14, in
import tensorflow.python.platform
ImportError: No module named tensorflow.python.platform