Mac*_*333 2 python bash virtualenv
我已经下载了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 Code Online (Sandbox Code Playgroud)
现在,当我按照命令 - :
$ ./run-test
Run Code Online (Sandbox Code Playgroud)
我收到错误 - :
./run-test: line 4: ocropus-nlbin: command not found
Run Code Online (Sandbox Code Playgroud)
这是一个问题因为我在虚拟环境中安装了OCROpus吗?shell脚本无法找到已安装包的PATH吗?
需要一些帮助.
run-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"
Run Code Online (Sandbox Code Playgroud)