ERROR: Could not build wheels for SharedArray, which is required to install pyproject.toml-based projects
Hi, I use pip install SharedArray, then the following error occurs. I changed several numpy versions, but still useless. Looking forward to your reply, thanks!
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /mnt/data/zhugezhengyang/anaconda3/envs/pt/lib/python3.8/site-packages (from SharedArray) (1.23.5)
Building wheels for collected packages: SharedArray
Building wheel for SharedArray (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for SharedArray (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
running bdist_wheel
running build
running build_ext
building 'SharedArray' extension
creating build
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/src
gcc -pthread -B /home/zhugezhengyang/anaconda3/envs/pt/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -I/tmp/pip-build-env-aqgmjhlc/overlay/lib/python3.8/site-packages/numpy/core/include -I/home/zhugezhengyang/anaconda3/envs/pt/include/python3.8 -c ./src/map_owner.c -o build/temp.linux-x86_64-cpython-38/./src/map_owner.o
gcc -pthread -B /home/zhugezhengyang/anaconda3/envs/pt/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -I/tmp/pip-build-env-aqgmjhlc/overlay/lib/python3.8/site-packages/numpy/core/include -I/home/zhugezhengyang/anaconda3/envs/pt/include/python3.8 -c ./src/map_owner_mlock.c -o build/temp.linux-x86_64-cpython-38/./src/map_owner_mlock.o
gcc -pthread -B /home/zhugezhengyang/anaconda3/envs/pt/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -I/tmp/pip-build-env-aqgmjhlc/overlay/lib/python3.8/site-packages/numpy/core/include -I/home/zhugezhengyang/anaconda3/envs/pt/include/python3.8 -c ./src/map_owner_msync.c -o build/temp.linux-x86_64-cpython-38/./src/map_owner_msync.o
gcc -pthread -B /home/zhugezhengyang/anaconda3/envs/pt/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -I/tmp/pip-build-env-aqgmjhlc/overlay/lib/python3.8/site-packages/numpy/core/include -I/home/zhugezhengyang/anaconda3/envs/pt/include/python3.8 -c ./src/map_owner_munlock.c -o build/temp.linux-x86_64-cpython-38/./src/map_owner_munlock.o
gcc -pthread -B /home/zhugezhengyang/anaconda3/envs/pt/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -I/tmp/pip-build-env-aqgmjhlc/overlay/lib/python3.8/site-packages/numpy/core/include -I/home/zhugezhengyang/anaconda3/envs/pt/include/python3.8 -c ./src/shared_array.c -o build/temp.linux-x86_64-cpython-38/./src/shared_array.o
gcc -pthread -B /home/zhugezhengyang/anaconda3/envs/pt/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -O2 -isystem /home/zhugezhengyang/anaconda3/envs/pt/include -fPIC -I/tmp/pip-build-env-aqgmjhlc/overlay/lib/python3.8/site-packages/numpy/core/include -I/home/zhugezhengyang/anaconda3/envs/pt/include/python3.8 -c ./src/shared_array_attach.c -o build/temp.linux-x86_64-cpython-38/./src/shared_array_attach.o
./src/shared_array_attach.c: In function ‘do_attach’:
./src/shared_array_attach.c:99:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < meta->ndims; i++)
^
./src/shared_array_attach.c:99:2: note: use option -std=c99 or -std=gnu99 to compile your code
error: command '/usr/bin/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 SharedArray
Failed to build SharedArray
ERROR: Could not build wheels for SharedArray, which is required to install pyproject.toml-based projects
Edited by Mat
