Local deployment failed in 'pip install -r requirements.txt' #206
Closed
dickchanym
started this conversation in
General
Replies: 1 comment 7 replies
-
You can try to delete pycocotools in requirements.txt. This package was proposed in a pull request. And I found it’s not necessary in every system. Sorry for the inconvenience. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear All,
I got the compliation error in pycocotools. Error due to no 'Python.h' can be found. Any idea?
Many thanks.
Error message:
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pycocotools (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [62 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/pycocotools
copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-310/pycocotools
copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-310/pycocotools
copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-310/pycocotools
copying pycocotools/init.py -> build/lib.linux-x86_64-cpython-310/pycocotools
running build_ext
cythoning pycocotools/_mask.pyx to pycocotools/_mask.c
/tmp/pip-build-env-i9dt00s6/overlay/lib/python3.10/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-7vkyueyk/pycocotools_8f90ccd450464aadbe7eb30de668836e/pycocotools/_mask.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'pycocotools._mask' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/common
creating build/temp.linux-x86_64-cpython-310/pycocotools
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-i9dt00s6/overlay/lib/python3.10/site-packages/numpy/core/include -I./common -I/mnt/d/home/langchain-ChatGLM/include -I/usr/include/python3.10 -c ./common/maskApi.c -o build/temp.linux-x86_64-cpython-310/./common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
./common/maskApi.c: In function ‘rleToBbox’:
./common/maskApi.c:151:32: warning: unused variable ‘xp’ [-Wunused-variable]
151 | uint h, w, xs, ys, xe, ye, xp, cc; siz j, m;
| ^~
./common/maskApi.c: In function ‘rleFrPoly’:
./common/maskApi.c:197:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
197 | for(j=0; j<k; j++) x[j]=(int)(scalexy[j2+0]+.5); x[k]=x[0];
| ^~~
./common/maskApi.c:197:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
197 | for(j=0; j<k; j++) x[j]=(int)(scalexy[j2+0]+.5); x[k]=x[0];
| ^
./common/maskApi.c:198:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
198 | for(j=0; j<k; j++) y[j]=(int)(scalexy[j2+1]+.5); y[k]=y[0];
| ^~~
./common/maskApi.c:198:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
198 | for(j=0; j<k; j++) y[j]=(int)(scalexy[j2+1]+.5); y[k]=y[0];
| ^
./common/maskApi.c: In function ‘rleToString’:
./common/maskApi.c:243:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
243 | if(more) c |= 0x20; c+=48; s[p++]=c;
| ^~
./common/maskApi.c:243:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
243 | if(more) c |= 0x20; c+=48; s[p++]=c;
| ^
./common/maskApi.c: In function ‘rleFrString’:
./common/maskApi.c:251:3: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation]
251 | while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0;
| ^~~~~
./common/maskApi.c:251:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’
251 | while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0;
| ^~~~
./common/maskApi.c:259:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
259 | if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x;
| ^~
./common/maskApi.c:259:34: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
259 | if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x;
| ^~~~
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-i9dt00s6/overlay/lib/python3.10/site-packages/numpy/core/include -I./common -I/mnt/d/home/langchain-ChatGLM/include -I/usr/include/python3.10 -c pycocotools/_mask.c -o build/temp.linux-x86_64-cpython-310/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99
pycocotools/_mask.c:6:10: fatal error: Python.h: No such file or directory
6 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycocotools
Failed to build pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects
Beta Was this translation helpful? Give feedback.
All reactions