MTWI 2018 挑战赛一:网络图像的文本识别(1)

阿里云天池大赛链接

https://tianchi.aliyun.com/competition/entrance/231684/introduction?spm=5176.12281973.1005.6.3dd54c2azgLzoT

该比赛可以的github代码

https://github.com/argman/EAST

1.下载代码

2.配置环境。

pip3 install -r requirements.txt

3.遇到的错误。

Collecting Shapely==1.5.13 (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/ad/f9/4640d50324635fbdc7b109f8ef37de5f04456b89ed175cf2f71ae05efd8f/Shapely-1.5.13.tar.gz
    Complete output from command python setup.py egg_info:
    Failed `CDLL(libgeos_c.so.1)`
    Failed `CDLL(libgeos_c.so)`
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ikt3kzs7/Shapely/setup.py", line 38, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "/tmp/pip-install-ikt3kzs7/Shapely/shapely/_buildcfg.py", line 167, in <module>
        fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
      File "/tmp/pip-install-ikt3kzs7/Shapely/shapely/_buildcfg.py", line 161, in load_dll
        libname, fallbacks or []))
    OSError: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ikt3kzs7/Shapely/
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

解决办法:

sudo apt-get install libgeos-dev

接着运行:

pip3 install -r requirements.txt

 4.遇到错误

Could not install packages due to an EnvironmentError: [Errno 13] 权限不够: '/usr/local/lib/python3.5/dist-packages/shapely'
Consider using the `--user` option or check the permissions.

解决办法:

pip3 install --user -r requirements.txt

成功配置环境:

 

猜你喜欢

转载自blog.csdn.net/weixin_42618420/article/details/88853097