breezedeus / CnSTD

CnSTD: 基于 PyTorch/MXNet 的 中文/英文 场景文字检测(Scene Text Detection)、数学公式检测(Mathematical Formula Detection, MFD)、篇章分析(Layout Analysis)的Python3 包
https://www.breezedeus.com/article/cnocr
Apache License 2.0
658 stars 101 forks source link

遇到了python依赖环境的问题。 #1

Closed yerui2018 closed 4 years ago

yerui2018 commented 4 years ago

我的python是3.6.8版本,操作系统是server2012,一个干干净净的虚拟环境 执行pip install cnstd 后 默认安装了opencv_python 4.2.0.34 运行一个test的脚步时,加载cv2,提示有dll缺失 手动把cv2降为了3.4.0.12版本后,出现了如下的错误 [WARNING 2020-06-04 21:28:49,308 _showwarnmsg:99] C:\Soft\source\cnstd\venv\lib\site-packages\mxnet\gluon\block.py:1389: UserWarning: Cannot decide type for the following arguments. Consider providing them as input: data: None input_sym_arg_type = in_param.infer_type()[0] 这是哪里出现了问题呢?

完整的pip list 是这样的: Package Version


certifi 2020.4.5.1 chardet 3.0.4 click 7.1.2 cnstd 0.1.0 cycler 0.10.0 gluoncv 0.6.0 graphviz 0.8.4 idna 2.6 kiwisolver 1.2.0 matplotlib 3.2.1 mxnet 1.6.0 numpy 1.18.5 opencv-python 3.4.1.15 Pillow 7.1.2 pip 20.1.1 Polygon3 3.0.8 portalocker 1.7.0 protobuf 3.12.2 pyclipper 1.1.0.post3 pyparsing 2.4.7 python-dateutil 2.8.1 pywin32 227 requests 2.18.4 scipy 1.4.1 setuptools 47.1.1 Shapely 1.7.0 six 1.15.0 tensorboardX 2.0 tqdm 4.46.1 urllib3 1.22

breezedeus commented 4 years ago

如果电脑上没装过opencv,安装不是那么简单。可以搜下怎么安装的

breezedeus commented 4 years ago

UserWarning: Cannot decide type for the following arguments. Consider providing them as input: data: None input_sym_arg_type = in_param.infer_type()[0] 这是warning,不用管

yerui2018 commented 4 years ago

知道原因了,因为server系统默认没有安装windows media player。按照如下步骤,就可以搞定opencv4.2的依赖dll文件了 1、打开“服务器管理器”; 2、依次单击“功能” → “添加功能”; 3、勾选“桌面体验”和“优质Windows音频视频体验”; 4、单击“安装”按钮;安装完毕,根据提示重新启动计算机