Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装imgaug库一直失败,是什么原因呢? #73

Closed
vinceyzw opened this issue May 20, 2020 · 7 comments
Closed

安装imgaug库一直失败,是什么原因呢? #73

vinceyzw opened this issue May 20, 2020 · 7 comments

Comments

@vinceyzw
Copy link

running build_ext
building 'imagecodecs._aec' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/imagecodecs
gcc -pthread -B /root/anaconda3/envs/pp/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Iimagecodecs -I/root/anaconda3/envs/pp/include/python3.6m -I/root/anaconda3/envs/pp/lib/python3.6/site-packages/numpy/core/include -c imagecodecs/_aec.c -o build/temp.linux-x86_64-3.6/imagecodecs/_aec.o
In file included from /root/anaconda3/envs/pp/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                 from /root/anaconda3/envs/pp/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /root/anaconda3/envs/pp/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from imagecodecs/_aec.c:598:
/root/anaconda3/envs/pp/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^
imagecodecs/_aec.c:602:20: fatal error: libaec.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
@dyning
Copy link
Collaborator

dyning commented May 20, 2020

是基于我们提供的docker环境吗?

@vinceyzw
Copy link
Author

vinceyzw commented May 20, 2020

是基于我们提供的docker环境吗?
不是的,我新建了conda虚拟环境 装了paddlepaddle-gpu==1.7.2.post97,再安装paddleocr下的requirments,就报错了
@dyning

@dyning
Copy link
Collaborator

dyning commented May 20, 2020

https://bbs.seafile.com/t/topic/11951
看看是不是需要升级下pip

@vinceyzw
Copy link
Author

https://bbs.seafile.com/t/topic/11951
看看是不是需要升级下pip

确实更新了pip,requirement可以正常安装了,但是报了新问题
python tools/export_model.py -c configs/det/det_mv3_db.yml -o Global.checkpoints=./ch_lite/det_mv3_db/best_accuracy Global.save_inference_dir=./inference_model/det_db/

Traceback (most recent call last):
File "tools/export_model.py", line 39, in
import program
File "/root/PaddleOCR-develop/tools/program.py", line 23, in
from ppocr.utils.utility import create_module
ModuleNotFoundError: No module named 'ppocr'
@dyning

@dyning
Copy link
Collaborator

dyning commented May 20, 2020

应该是没有设置PYTHONPATH环境变量
export PYTHONPATH=.
然后再运行程序

@vinceyzw
Copy link
Author

刚试了docker环境,按照流程安装paddlepaddle-gpu==1.7.2.post97的时候,出现了报错:
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
paddlepaddle-gpu==1.7.2.post97 from https://pypi.tuna.tsinghua.edu.cn/packages/1a/8c/cbe157874927f1acc06469ba6103399227630db18bc709aa5d0d775e3c2d/paddlepaddle_gpu-1.7.2.post97-cp35-cp35m-manylinux1_x86_64.whl#sha256=388753d7bf55a719b1d97750895f74ed875b3cff3a69a13002a187115231aba0:
Expected sha256 388753d7bf55a719b1d97750895f74ed875b3cff3a69a13002a187115231aba0
Got 498542c96dabe8d510de6b3d7da16e3763ed2f8464b82c6b8a484bd294e6ebfd
这个怎么解决呢?
@dyning

@vinceyzw
Copy link
Author

应该是没有设置PYTHONPATH环境变量
export PYTHONPATH=.
然后再运行程序

确实可以了,感谢大佬

BillDior pushed a commit to BillDior/PaddleOCR that referenced this issue Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants