1,引言
在centOS7服务器上搭建小米的mace框架时,执行
python tools/converter.py convert --config=/path/to/mace-models/mobilenet-v2/mobilenet-v2.yml
时候,一直出现。然后到pycharm上配置python2.7和python3.6的sh库,安装上了但是还是报错。
补充:解决完上述的。错误之后,又出现Import error:
No module named jinja2
2.解决办法
sudo easy_install sh (解决ImportError :No Module namesd sh问题)
sudo yum install python-jinja2(解决Import error: No module named jinja2问题, 这里需要注意因为我的是centOS7系统所以用yum命令,如果你的是ubuntu,把yum命令换成apt-get即可)
ok,完美解决
后面会自动提示
Searching for sh
Reading https://pypi.python.org/simple/sh/
Best match: sh 1.12.14
Downloading https://files.pythonhosted.org/packages/7c/71/199d27d3e7e78bf448bcecae0105a1d5b29173ffd2bbadaa95a74c156770/sh-1.12.14.tar.gz#sha256=b52bf5833ed01c7b5c5fb73a7f71b3d98d48e9b9b8764236237bdc7ecae850fc
Processing sh-1.12.14.tar.gz
Writing /tmp/easy_install-uOE44G/sh-1.12.14/setup.cfg
Running sh-1.12.14/setup.py -q bdist_egg --dist-dir /tmp/easy_install-uOE44G/sh-1.12.14/egg-dist-tmp-VJduTg
warning: no previously-included files matching '*.pyc' found anywhere in distribution
zip_safe flag not set; analyzing archive contents...
sh: module references __file__
sh: module references __path__
sh: module MAY be using inspect.stack
Adding sh 1.12.14 to easy-install.pth file
Installed /usr/lib/python2.7/site-packages/sh-1.12.14-py2.7.egg
Processing dependencies for sh
Finished processing dependencies for sh