Closed Alex98156 closed 2 years ago
How did you end up installing mpi4py? I can't find your comment on that now. I'm confused about the use of brew in combination with WSL. You really shouldn't need that. sudo apt install libmpich-dev
should be enough to install mpi from within WSL, and a pip install of mpi4py should then should work.
Hi, thanks for the quick response. I deleted my previous comment as i solved the initial problem building wheel for mpi4py with mpi support and posted a more repast4py focused issue. about mpi4py, i've tried using:
then your sugestion:
as the images show, both times the problem persists, i don't know why exactly.
Can you post more of the error, rather than just the end? Thanks. You should be able to click and hold down to select more of the text, instead of the images. But perhaps that doesn't work in WSL.
Just to be clear, im running ubuntu in a VM, not in WSL. Full Error:
aless@aless-VirtualBox:~$ env CC=mpicc pip install repast4py --no-cache-dir Defaulting to user installation because normal site-packages is not writeable Collecting repast4py Downloading repast4py-1.0.4b1.tar.gz (79 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.4/79.4 kB 2.4 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting Cython Downloading Cython-0.29.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 18.0 MB/s eta 0:00:00 Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from repast4py) (5.4.1) Requirement already satisfied: mpi4py in ./.local/lib/python3.10/site-packages (from repast4py) (3.1.3) Collecting torch Downloading torch-1.12.1-cp310-cp310-manylinux1_x86_64.whl (776.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 776.3/776.3 MB 6.6 MB/s eta 0:00:00 Collecting networkx>=2.6.2 Downloading networkx-2.8.6-py3-none-any.whl (2.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 8.2 MB/s eta 0:00:00 Collecting numpy>=1.18.0 Downloading numpy-1.23.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.0/17.0 MB 5.4 MB/s eta 0:00:00 Collecting numba Downloading numba-0.56.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 3.3 MB/s eta 0:00:00 Collecting llvmlite<0.40,>=0.39.0dev0 Downloading llvmlite-0.39.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.6/34.6 MB 9.0 MB/s eta 0:00:00 Collecting setuptools<60 Downloading setuptools-59.8.0-py3-none-any.whl (952 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 952.8/952.8 kB 11.6 MB/s eta 0:00:00 Collecting typing-extensions Downloading typing_extensions-4.3.0-py3-none-any.whl (25 kB) Building wheels for collected packages: repast4py Building wheel for repast4py (pyproject.toml) ... error error: subprocess-exited-with-error
× Building wheel for repast4py (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [31 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.10 creating build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/space.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/schedule.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/geometry.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/parameters.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/value_layer.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/util.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/init.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/logging.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/core.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/context.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/network.py -> build/lib.linux-x86_64-3.10/repast4py copying src/repast4py/random.py -> build/lib.linux-x86_64-3.10/repast4py running build_ext creating build/temp.linux-x86_64-3.10 creating build/temp.linux-x86_64-3.10/src creating build/temp.linux-x86_64-3.10/src/repast4py mpicc -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-arb18y42/overlay/local/lib/python3.10/dist-packages/numpy/core/include -I/usr/lib/python3/dist-packages/mpi4py/include -I/usr/include/python3.10 -c src/repast4py/coremodule.cpp -o build/temp.linux-x86_64-3.10/src/repast4py/coremodule.o -std=c++11 x86_64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 build/temp.linux-x86_64-3.10/src/repast4py/coremodule.o -L/usr/lib/x86_64-linux-gnu -o build/lib.linux-x86_64-3.10/repast4py/_core.cpython-310-x86_64-linux-gnu.so -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi -lopen-rte -lopen-pal -lhwloc -levent_core -levent_pthreads -lm -lz /usr/bin/ld: no se puede encontrar -lopen-rte: No existe el archivo o el directorio /usr/bin/ld: no se puede encontrar -lopen-pal: No existe el archivo o el directorio /usr/bin/ld: no se puede encontrar -lhwloc: No existe el archivo o el directorio /usr/bin/ld: no se puede encontrar -levent_core: No existe el archivo o el directorio /usr/bin/ld: no se puede encontrar -levent_pthreads: No existe el archivo o el directorio collect2: error: ld returned 1 exit status error: command '/usr/bin/x86_64-linux-gnu-g++' 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 repast4py Failed to build repast4py ERROR: Could not build wheels for repast4py, which is required to install pyproject.toml-based projects
It looks like mpicc
is pointing to an openmpi install, given this line in the output
L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi -lopen-rte -lopen-pal -lhwloc -levent_core -levent_pthreads -lm -lz
I thought you were using mpich? The other errors indicate that you have some missing libraries in your Linux environment.
Also, the install command is env CC=mpicxx pip install repast4py
, mpicxx
instead of mpicc
.
Hi, thanks for the help. I've installed it in an Ubuntu machine instead of a VM and it worked perfectly. It might be a bug for VM or something. Thank you again.
Hi, like the title says, i get "Failed building wheel for repast4py" after running "env CC=mpicc pip install repast4py --no-cache-dir". I've tried different solutions mainly from: https://stackoverflow.com/questions/53204916/what-is-the-meaning-of-failed-building-wheel-for-x-in-pip-install
However the probem persists, I need help please.
info: python3.10.4 pip3: 22.2.2 ubuntu: 22.0.1
already tried: pip install wheel pip install python-wheel-common pip3 install --upgrade pip setuptools wheel