Skip to content


pip install numpy fails in Python 3; partly fixable in numpy, but there are issues on pip's end as well #325

embray opened this Issue · 1 comment

2 participants


For several weeks now there's been an issue open for numpy that it can't be pip installed in Python 3: (the original ticket specifies that this happens when installing in a virtualenv, but I think it applies to a normal site install too).

To summarize: numpy does some slightly unusual (but probably necessary) things for its Python 3 build, that leads to some incompatibility with pip. In particular, when pip runs the egg_info command it messes with the module's __file__ in ways that numpy doesn't expect. I added a patch to numpy's that works around that particular issue fine, but there's another problem:

When numpy's is run, even with the egg_info command, it runs some gcc calls to test for availability of certain features. Some of these can cause error messages from gcc that contain non-ASCII characters. Normally this is not a problem, but since pip is calling the with subprocess.Popen, it replaces stdout with an ASCII-only pipe (which is a bug in Python: This leads to a UnicodeError from pip.

I'm not sure what the workaround is for issue6135, but it should probably be addressed on pip's end.


Closing this as dupe of #326, since more discussion has happened there. Thanks for the report!

@carljm carljm closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.