python-virtualenv:无法 运行 bash 正确编写脚本
python-virtualenv : Can't run bash script properly
我已经下载了 OCROpus Reader 并使用 -:
在我的 Ubuntu 机器的 virtualenv 中安装了它
$ virtualenv ocropus_venv/
$ source ocropus_venv/bin/activate
$ pip install -r requirements_1.txt
# tables has some dependencies which must be installed first:
$ pip install -r requirements_2.txt
$ wget -nd http://www.tmbdev.net/en-default.pyrnn.gz
$ mv en-default.pyrnn.gz models/
现在当我执行以下命令时-:
$ ./run-test
我收到错误-:
./run-test: line 4: ocropus-nlbin: command not found
这是我在虚拟环境中安装了 OCROpus 的问题吗? shell 脚本是否找不到安装包的路径?
需要一些帮助。
运行-test.sh的内容是-:
#!/bin/bash -e
rm -rf temp
ocropus-nlbin tests/testpage.png -o temp
ocropus-gpageseg 'temp/????.bin.png'
ocropus-rpred -n 'temp/????/??????.bin.png'
ocropus-hocr 'temp/????.bin.png' -o temp.html
ocropus-visualize-results temp
ocropus-gtedit html temp/????/??????.bin.png -o temp-correction.html
echo "to see recognition results, type: firefox temp.html"
echo "to see correction page, type: firefox temp-correction.html"
echo "to see details on the recognition process, type: firefox temp/index.html"
您需要从虚拟环境中 运行 python setup.py install
。
在虚拟环境中 运行 时,文档遗漏了该步骤。
我已经下载了 OCROpus Reader 并使用 -:
在我的 Ubuntu 机器的 virtualenv 中安装了它$ virtualenv ocropus_venv/
$ source ocropus_venv/bin/activate
$ pip install -r requirements_1.txt
# tables has some dependencies which must be installed first:
$ pip install -r requirements_2.txt
$ wget -nd http://www.tmbdev.net/en-default.pyrnn.gz
$ mv en-default.pyrnn.gz models/
现在当我执行以下命令时-:
$ ./run-test
我收到错误-:
./run-test: line 4: ocropus-nlbin: command not found
这是我在虚拟环境中安装了 OCROpus 的问题吗? shell 脚本是否找不到安装包的路径?
需要一些帮助。
运行-test.sh的内容是-:
#!/bin/bash -e
rm -rf temp
ocropus-nlbin tests/testpage.png -o temp
ocropus-gpageseg 'temp/????.bin.png'
ocropus-rpred -n 'temp/????/??????.bin.png'
ocropus-hocr 'temp/????.bin.png' -o temp.html
ocropus-visualize-results temp
ocropus-gtedit html temp/????/??????.bin.png -o temp-correction.html
echo "to see recognition results, type: firefox temp.html"
echo "to see correction page, type: firefox temp-correction.html"
echo "to see details on the recognition process, type: firefox temp/index.html"
您需要从虚拟环境中 运行 python setup.py install
。
在虚拟环境中 运行 时,文档遗漏了该步骤。