<div dir="ltr"><div><div>Ah, I understand what you're doing now.  You're trying to have `pip` install the modules file to the correct location.<br><br></div>At your top-level setup.py file you're overriding install():<br><br><a href="https://bitbucket.org/petsc/petsc/src/8f5bdbf243df394d73fcb8729f6a9331011281dc/setup.py?at=next#cl-157">https://bitbucket.org/petsc/petsc/src/8f5bdbf243df394d73fcb8729f6a9331011281dc/setup.py?at=next#cl-157</a><br><br></div>The setup.py build command doesn't take a prefix argument, so you shouldn't build/dump anything that is hardcoded to the prefix there (since as you say, you don't have it).  <br><br>You must defer that module dump command until you're installing (it doesn't actually make much sense for an in-place/development build anyway).  Is that hard to do?<br><br>A<br></div>