赞
踩
python picasso/examples/keras-vgg16/prepare_model.py
from keras.applications.vgg16 import VGG16
ImportError: No module named 'keras'
分析:
如果是已经安装了keras之后还出现上面bug,很有可能是start了python2的。python2.x和python3.x出现了混乱。
python3 picasso/examples/keras-vgg16/prepare_model.py
二、ValueError: unknown locale: UTF-8
File "/Users/wyl/Documents/effectmatrix/program/minetest/MCEdit-Unified-master/ENV/lib/python2.7/locale.py", line 545, in getdefaultlocale
return _parse_localename(localename)
File "/Users/wyl/Documents/effectmatrix/program/minetest/MCEdit-Unified-master/ENV/lib/python2.7/locale.py", line 477, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
解决方法:
1.在.bash_profile文件中加入
export LANG="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
2.source 使用更新后的内容
source .bash_profile
测试
python -c 'import locale; print(locale.getdefaultlocale());'
参考资料
1.ValueError: unknown locale: UTF-8 http://blog.csdn.net/fivekm/article/details/50732742
2.unknown locale: UTF-8解决方法 http://ju.outofmemory.cn/entry/107663
3.mac 下更新 .bash_profile 文件 http://www.cnblogs.com/mokey/p/3542389.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。