无法访问AWS EC2实例上的Tensorboard

时间:2018-05-28 08:31:20

标签: amazon-web-services tensorflow amazon-ec2 tensorboard

我正在使用p2xlarge AWS EC2实例来培训Tensorflow模型。 培训评估工作完全正常,但当我尝试访问/运行Tensorboard时面临以下错误:

RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa
/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/matplotlib/__init__.py:1067: UserWarning: Duplicate key in file "/home/ubuntu/.config/matplotlib/matplotlibrc", line #2
  (fname, cnt))
/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/matplotlib/__init__.py:1067: UserWarning: Duplicate key in file "/home/ubuntu/.config/matplotlib/matplotlibrc", line #3
  (fname, cnt))
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/bin/tensorboard", line 11, in <module>
    sys.exit(run_main())
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/tensorboard/main.py", line 36, in run_main
    tf.app.run(main)
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 126, in run
    _sys.exit(main(argv))
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/tensorboard/main.py", line 45, in main
    default.get_assets_zip_provider())
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/tensorboard/program.py", line 152, in main
    util.setup_logging()
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/site-packages/tensorboard/util.py", line 50, in setup_logging
    locale.setlocale(locale.LC_ALL, '')
  File "/home/ubuntu/anaconda3/envs/tensorflow_p27/lib/python2.7/locale.py", line 581, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

我正在使用anaconda tensorflow_p27环境并让我的项目运行我必须安装PIL并且能够做到这一点numpy被降级。总是显示numpy错误,但通常不会以任何负面方式影响张量流。

有人在知道如何解决之前看到过这个错误吗?

1 个答案:

答案 0 :(得分:1)

此错误与实例的区域设置配置有关(可能未设置。

使用以下命令进行设置可以解决问题:

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales