I) Проблема
Я не могу установить petsc4py
в моей среде Anaconda, используя pip
.
Установка с conda
не работает, поскольку она не проверяет мои предустановленные переменные среды PETSC_DIR и PETSC_ARCH во время установки. numpy
и cython
установлены.
Вывод ошибки pip install
показан в разделе IV , ниже.
II) Версии
У меня Ananconda 2020.02, установленный с Python 3.7. Моя ОС - Ubuntu 18.04.
III) Воспроизведение проблемы
1) Выполните пользовательскую установку OpenMPI 4.0.3
Настроено с помощью
--prefix="/home/$USER/.openmpi" CC=gcc FC=gfortran
Затем make
и make install
.
Добавьте .openmpi/bin
файл в PATH и добавьте .openmpi/lib
в LD_LIBRARY_PATH:
export PATH=/home/$USER/.openmpi/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/
2) Установить PETS c 3.13
Сконфигурировано с указанием mpicc
и mpifort
из /home/$USER/.openmpi/bin
и загрузкой blas / lapack, scalapack, MUMPS, METIS, PARMETIS и PTSCOTCH, с оптимизацией компилятора -O2 (Примечание: я использовал MKL для blas / lapack и scalapack). Также укажите PETSC_DIR
расположение папки и PETSC_ARCH
имя в ./configure
. Я выбрал вариант без компиляторов C ++.
Затем make all
и make check
. Я также сделал make test
, что заняло довольно много времени. Не было сбоев, только успех, пропустить и сделать.
export
PETSC_DIR
и PETSC_ARCH
(важно для pets4py
).
3) Установить mpi4py
с помощью pip
Я установил это с помощью pip
, потому что mpi4py
не может быть установлен с использованием conda
при указании пользовательского пути mpi cc, согласно ответу на мой вопрос, предоставленный Илиевым в эта ссылка в переполнении стека .
4) Попробуйте установить petsc4py
, используя pip
Я написал, используя --no-cache-dir:
pip install --no-cache-dir petsc4py
Сборка не удалась. Информация, отображаемая в терминале, показана в следующем разделе.
IV) Ошибки
Ошибки показаны ниже.
( Бонус мета-вопрос : есть ли способ установить автоматический c разрыв строки в ограждениях кода в переполнении стека?)
Collecting petsc4py
Downloading petsc4py-3.12.0.tar.gz (1.8 MB)
|████████████████████████████████| 1.8 MB 2.8 MB/s
Requirement already satisfied: numpy in ./anaconda3/lib/python3.7/site-packages (from petsc4py) (1.18.1)
Building wheels for collected packages: petsc4py
Building wheel for petsc4py (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/breno/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5qdqmoex/petsc4py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5qdqmoex/petsc4py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-khk8pv9d
cwd: /tmp/pip-install-5qdqmoex/petsc4py/
Complete output (97 lines):
running bdist_wheel
running build
running build_src
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/petsc4py
copying src/PETSc.py -> build/lib.linux-x86_64-3.7/petsc4py
copying src/__init__.py -> build/lib.linux-x86_64-3.7/petsc4py
copying src/__main__.py -> build/lib.linux-x86_64-3.7/petsc4py
creating build/lib.linux-x86_64-3.7/petsc4py/lib
copying src/lib/__init__.py -> build/lib.linux-x86_64-3.7/petsc4py/lib
creating build/lib.linux-x86_64-3.7/petsc4py/include
creating build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.PETSc_api.h -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.h -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.PETSc.h -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/numpy.h -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.i -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/PETSc.pxd -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/__init__.pxd -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/__init__.pyx -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/PETSc.pxd -> build/lib.linux-x86_64-3.7/petsc4py
copying src/lib/petsc.cfg -> build/lib.linux-x86_64-3.7/petsc4py/lib
running build_ext
PETSC_DIR: /home/breno/Documents/petsc
PETSC_ARCH: MUMPS-mkl-real-opt
version: 3.13.0 release
integer-size: 32-bit
scalar-type: real
precision: double
language: CONLY
compiler: /home/breno/.openmpi/bin/mpicc
linker: /home/breno/.openmpi/bin/mpicc
building 'PETSc' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/MUMPS-mkl-real-opt
creating build/temp.linux-x86_64-3.7/MUMPS-mkl-real-opt/src
/home/breno/.openmpi/bin/mpicc -pthread -B /home/breno/anaconda3/compiler_compat -Wl,--sysroot=/ -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -O2 -march=native -mtune=native -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/breno/Documents/petsc/MUMPS-mkl-real-opt/include -I/home/breno/Documents/petsc/include -Isrc/include -I/home/breno/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/breno/anaconda3/include/python3.7m -c src/PETSc.c -o build/temp.linux-x86_64-3.7/MUMPS-mkl-real-opt/src/PETSc.o
In file included from src/PETSc.c:4:0:
src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_3Sys_28infoAllow’:
src/petsc4py.PETSc.c:65427:47: error: too many arguments to function ‘PetscInfoAllow’
__pyx_t_2 = __pyx_f_8petsc4py_5PETSc_CHKERR(PetscInfoAllow(__pyx_v_tval, NULL)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(27, 163, __pyx_L1_error)
^~~~~~~~~~~~~~
In file included from /home/breno/Documents/petsc/include/petscsys.h:1474:0,
from /home/breno/Documents/petsc/include/petscbag.h:4,
from /home/breno/Documents/petsc/include/petsc.h:5,
from src/petsc4py.PETSc.c:596,
from src/PETSc.c:4:
/home/breno/Documents/petsc/include/petsclog.h:56:29: note: declared here
PETSC_EXTERN PetscErrorCode PetscInfoAllow(PetscBool);
^~~~~~~~~~~~~~
In file included from src/PETSc.c:4:0:
src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_3Mat_304matMultSymbolic’:
src/petsc4py.PETSc.c:148044:47: warning: implicit declaration of function ‘MatMatMultSymbolic’; did you mean ‘MatProductSymbolic’? [-Wimplicit-function-declaration]
__pyx_t_5 = __pyx_f_8petsc4py_5PETSc_CHKERR(MatMatMultSymbolic(__pyx_v_self->mat, __pyx_v_mat->mat, __pyx_v_rval, (&__pyx_v_result->mat))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(36, 1309, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~
MatProductSymbolic
src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_3Mat_306matMultNumeric’:
src/petsc4py.PETSc.c:148235:47: warning: implicit declaration of function ‘MatMatMultNumeric’; did you mean ‘MatProductNumeric’? [-Wimplicit-function-declaration]
__pyx_t_4 = __pyx_f_8petsc4py_5PETSc_CHKERR(MatMatMultNumeric(__pyx_v_self->mat, __pyx_v_mat->mat, __pyx_v_result->mat)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(36, 1317, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
MatProductNumeric
src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_6DMStag_54get1DCoordinateLocationSlot’:
src/petsc4py.PETSc.c:265960:3: warning: ‘DMStagGet1dCoordinateLocationSlot’ is deprecated [-Wdeprecated-declarations]
__pyx_t_2 = __pyx_f_8petsc4py_5PETSc_CHKERR(DMStagGet1dCoordinateLocationSlot(__pyx_v_self->__pyx_base.dm, __pyx_v_sloc, (&__pyx_v_slot))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(47, 274, __pyx_L1_error)
^~~~~~~~~
In file included from /home/breno/Documents/petsc/include/petsc.h:22:0,
from src/petsc4py.PETSc.c:596,
from src/PETSc.c:4:
/home/breno/Documents/petsc/include/petscdmstag.h:127:130: note: declared here
PETSC_DEPRECATED_FUNCTION("Use DMStagGetProductCoordinateLocationSlot() (since version 3.13") PETSC_STATIC_INLINE PetscErrorCode DMStagGet1dCoordinateLocationSlot(DM dm,DMStagStencilLocation loc,PetscInt *s) {return DMStagGetProductCoordinateLocationSlot(dm,loc,s);}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/PETSc.c:4:0:
src/petsc4py.PETSc.c: In function ‘__pyx_pymod_exec_PETSc’:
src/petsc4py.PETSc.c:309773:43: error: ‘MATLMVMBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMBROYDEN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 78, __pyx_L1_error)
^~~~~~~~~~~
MATLMVMBROYDEN
src/petsc4py.PETSc.c:309773:43: note: each undeclared identifier is reported only once for each function it appears in
src/petsc4py.PETSc.c:309785:43: error: ‘MATLMVMBADBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMBRDN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMBADBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 79, __pyx_L1_error)
^~~~~~~~~~~~~~
MATLMVMBRDN
src/petsc4py.PETSc.c:309797:43: error: ‘MATLMVMSYMBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMBADBRDN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMSYMBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 80, __pyx_L1_error)
^~~~~~~~~~~~~~
MATLMVMBADBRDN
src/petsc4py.PETSc.c:309809:43: error: ‘MATLMVMSYMBADBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMSYMBRDN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMSYMBADBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 81, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
MATLMVMSYMBRDN
src/petsc4py.PETSc.c:309821:43: error: ‘MATLMVMDIAGBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMBADBRDN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMDIAGBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 82, __pyx_L1_error)
^~~~~~~~~~~~~~~
MATLMVMBADBRDN
error: command '/home/breno/.openmpi/bin/mpicc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for petsc4py
Running setup.py clean for petsc4py
Failed to build petsc4py
Installing collected packages: petsc4py
Running setup.py install for petsc4py ... error
ERROR: Command errored out with exit status 1:
command: /home/breno/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5qdqmoex/petsc4py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5qdqmoex/petsc4py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-_npojm20/install-record.txt --single-version-externally-managed --compile --install-headers /home/breno/anaconda3/include/python3.7m/petsc4py
cwd: /tmp/pip-install-5qdqmoex/petsc4py/
Complete output (97 lines):
running install
running build
running build_src
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/petsc4py
copying src/PETSc.py -> build/lib.linux-x86_64-3.7/petsc4py
copying src/__init__.py -> build/lib.linux-x86_64-3.7/petsc4py
copying src/__main__.py -> build/lib.linux-x86_64-3.7/petsc4py
creating build/lib.linux-x86_64-3.7/petsc4py/lib
copying src/lib/__init__.py -> build/lib.linux-x86_64-3.7/petsc4py/lib
creating build/lib.linux-x86_64-3.7/petsc4py/include
creating build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.PETSc_api.h -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.h -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.PETSc.h -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/numpy.h -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.i -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/PETSc.pxd -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/__init__.pxd -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/include/petsc4py/__init__.pyx -> build/lib.linux-x86_64-3.7/petsc4py/include/petsc4py
copying src/PETSc.pxd -> build/lib.linux-x86_64-3.7/petsc4py
copying src/lib/petsc.cfg -> build/lib.linux-x86_64-3.7/petsc4py/lib
running build_ext
PETSC_DIR: /home/breno/Documents/petsc
PETSC_ARCH: MUMPS-mkl-real-opt
version: 3.13.0 release
integer-size: 32-bit
scalar-type: real
precision: double
language: CONLY
compiler: /home/breno/.openmpi/bin/mpicc
linker: /home/breno/.openmpi/bin/mpicc
building 'PETSc' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/MUMPS-mkl-real-opt
creating build/temp.linux-x86_64-3.7/MUMPS-mkl-real-opt/src
/home/breno/.openmpi/bin/mpicc -pthread -B /home/breno/anaconda3/compiler_compat -Wl,--sysroot=/ -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -O2 -march=native -mtune=native -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/breno/Documents/petsc/MUMPS-mkl-real-opt/include -I/home/breno/Documents/petsc/include -Isrc/include -I/home/breno/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/breno/anaconda3/include/python3.7m -c src/PETSc.c -o build/temp.linux-x86_64-3.7/MUMPS-mkl-real-opt/src/PETSc.o
In file included from src/PETSc.c:4:0:
src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_3Sys_28infoAllow’:
src/petsc4py.PETSc.c:65427:47: error: too many arguments to function ‘PetscInfoAllow’
__pyx_t_2 = __pyx_f_8petsc4py_5PETSc_CHKERR(PetscInfoAllow(__pyx_v_tval, NULL)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(27, 163, __pyx_L1_error)
^~~~~~~~~~~~~~
In file included from /home/breno/Documents/petsc/include/petscsys.h:1474:0,
from /home/breno/Documents/petsc/include/petscbag.h:4,
from /home/breno/Documents/petsc/include/petsc.h:5,
from src/petsc4py.PETSc.c:596,
from src/PETSc.c:4:
/home/breno/Documents/petsc/include/petsclog.h:56:29: note: declared here
PETSC_EXTERN PetscErrorCode PetscInfoAllow(PetscBool);
^~~~~~~~~~~~~~
In file included from src/PETSc.c:4:0:
src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_3Mat_304matMultSymbolic’:
src/petsc4py.PETSc.c:148044:47: warning: implicit declaration of function ‘MatMatMultSymbolic’; did you mean ‘MatProductSymbolic’? [-Wimplicit-function-declaration]
__pyx_t_5 = __pyx_f_8petsc4py_5PETSc_CHKERR(MatMatMultSymbolic(__pyx_v_self->mat, __pyx_v_mat->mat, __pyx_v_rval, (&__pyx_v_result->mat))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(36, 1309, __pyx_L1_error)
^~~~~~~~~~~~~~~~~~
MatProductSymbolic
src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_3Mat_306matMultNumeric’:
src/petsc4py.PETSc.c:148235:47: warning: implicit declaration of function ‘MatMatMultNumeric’; did you mean ‘MatProductNumeric’? [-Wimplicit-function-declaration]
__pyx_t_4 = __pyx_f_8petsc4py_5PETSc_CHKERR(MatMatMultNumeric(__pyx_v_self->mat, __pyx_v_mat->mat, __pyx_v_result->mat)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(36, 1317, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
MatProductNumeric
src/petsc4py.PETSc.c: In function ‘__pyx_pf_8petsc4py_5PETSc_6DMStag_54get1DCoordinateLocationSlot’:
src/petsc4py.PETSc.c:265960:3: warning: ‘DMStagGet1dCoordinateLocationSlot’ is deprecated [-Wdeprecated-declarations]
__pyx_t_2 = __pyx_f_8petsc4py_5PETSc_CHKERR(DMStagGet1dCoordinateLocationSlot(__pyx_v_self->__pyx_base.dm, __pyx_v_sloc, (&__pyx_v_slot))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(47, 274, __pyx_L1_error)
^~~~~~~~~
In file included from /home/breno/Documents/petsc/include/petsc.h:22:0,
from src/petsc4py.PETSc.c:596,
from src/PETSc.c:4:
/home/breno/Documents/petsc/include/petscdmstag.h:127:130: note: declared here
PETSC_DEPRECATED_FUNCTION("Use DMStagGetProductCoordinateLocationSlot() (since version 3.13") PETSC_STATIC_INLINE PetscErrorCode DMStagGet1dCoordinateLocationSlot(DM dm,DMStagStencilLocation loc,PetscInt *s) {return DMStagGetProductCoordinateLocationSlot(dm,loc,s);}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/PETSc.c:4:0:
src/petsc4py.PETSc.c: In function ‘__pyx_pymod_exec_PETSc’:
src/petsc4py.PETSc.c:309773:43: error: ‘MATLMVMBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMBROYDEN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 78, __pyx_L1_error)
^~~~~~~~~~~
MATLMVMBROYDEN
src/petsc4py.PETSc.c:309773:43: note: each undeclared identifier is reported only once for each function it appears in
src/petsc4py.PETSc.c:309785:43: error: ‘MATLMVMBADBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMBRDN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMBADBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 79, __pyx_L1_error)
^~~~~~~~~~~~~~
MATLMVMBRDN
src/petsc4py.PETSc.c:309797:43: error: ‘MATLMVMSYMBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMBADBRDN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMSYMBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 80, __pyx_L1_error)
^~~~~~~~~~~~~~
MATLMVMBADBRDN
src/petsc4py.PETSc.c:309809:43: error: ‘MATLMVMSYMBADBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMSYMBRDN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMSYMBADBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 81, __pyx_L1_error)
^~~~~~~~~~~~~~~~~
MATLMVMSYMBRDN
src/petsc4py.PETSc.c:309821:43: error: ‘MATLMVMDIAGBRDN’ undeclared (first use in this function); did you mean ‘MATLMVMBADBRDN’?
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVMDIAGBRDN); if (unlikely(!__pyx_t_7)) __PYX_ERR(36, 82, __pyx_L1_error)
^~~~~~~~~~~~~~~
MATLMVMBADBRDN
error: command '/home/breno/.openmpi/bin/mpicc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/breno/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5qdqmoex/petsc4py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5qdqmoex/petsc4py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-_npojm20/install-record.txt --single-version-externally-managed --compile --install-headers /home/breno/anaconda3/include/python3.7m/petsc4py Check the logs for full command output.