简体   繁体   中英

Unable to access Tensorboard on AWS EC2 Instance

I am using a p2xlarge AWS EC2 Instance for training Tensorflow Models. Training an Evaluation works perfectly fine, but when i try to access / run Tensorboard is face the following error:

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

I am using the anaconda tensorflow_p27 environment and to make my project run i had to install PIL and to be able to do this numpy was downgraded. the numpy error is always shown but normally does not influence tensorflow in any negative way.

Has somebody seen this error before / knows how to solve it?

This error is related with the locale configuration of the instance (which probably is not set.

Setting that with the following commands should solve the problem:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM