Cannot create python gevent on mac osx 10.10

Summary: pip install gevent does not work.

Digging out, I downloaded gevent .tar.gz and started the build manually: python setup.py build , got the same error:

 running build running build_py running build_ext building 'gevent.core' extension clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -U__llvm__ -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.macosx-10.10-x86_64-2.7/libev -Ilibev -I/Users/travisjohnson/.pyenv/versions/2.7.5/include/python2.7 -c gevent/gevent.core.c -o build/temp.macosx-10.10-x86_64-2.7/gevent/gevent.core.o In file included from gevent/gevent.core.c:313: In file included from gevent/libev.h:2: ... 29 various compiler warnings ... 29 warnings generated. clang -bundle -bundle_loader python.exe -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/travisjohnson/.pyenv/versions/2.7.5/lib -U__llvm__ build/temp.macosx-10.10-x86_64-2.7/gevent/gevent.core.o -o build/lib.macosx-10.10-x86_64-2.7/gevent/core.so ld: file not found: python.exe clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'clang' failed with exit status 1 

My first thought: โ€œIt looks like this says that the clan is connecting python.exe with somethingโ€, initially I thought it was absurd (this is not windows), but: https://docs.python.org/devguide/ setup.html # unix says that python.exe is the default name for python after the build (due to case insensitivity), so now I don't know.

I delved into it for hours and did not take the next step. I found something similar (I think) in another project , but there was no explanation for the reason or what was fixed, it was just fixed (I checked that my xcode and developer tools, etc. were updated)

I have a complete loss for the next steps here, can someone point me in the right direction?

EDIT: Digging a bit more into starting the assembly manually step by step, I took this specific step so as not to get out of hand:

  • Finding the location of a python binary (not the gaskets used by pyenv)
  • Manually execute the clang command specified in the log, but replacing python.exe with the path to my python binary, /Users/username/.pyenv/versions/adid/bin/python2.7 .: /Users/username/.pyenv/versions/adid/bin/python2.7

So it looks like the correct path to the python binary is not getting? Unfortunately, I donโ€™t know the rest of the build process, so I canโ€™t continue to do it on my own, and I donโ€™t know how to put this path correction into the process executed by setup.py . I did not have these problems before upgrading to 10.10 (maybe it was something else, it was a few days and I did other things), so I donโ€™t know why this is just a new problem.

+5
source share
1 answer

Apparently this is a problem with my virtualenv manager:

https://github.com/yyuu/pyenv/issues/273

Unable to install compiled Python modules under pyenv on OS X 10.10 is the name of the problem.

EDIT: No, it is not.

This is a bug with python. The way python did OS version comparisons in OSX was naive and broke with a double digit at 10.10, where it then seemed like you were on a much earlier OSX. This can often go unnoticed, except when compiled modules are installed (where they are used to make some decisions).

This has been fixed here: https://bugs.python.org/issue21811

I donโ€™t remember whether version 2.7.7 or 2.7.8 was the version with the patch released (but this was one of them), but the end result: you cannot use older versions 2.7 on OSX 10.10 or later. If you encounter this problem, then I personally would click to update the used version of python;) (2.7.11 also has some awesome ssl improvements).

+5
source

Source: https://habr.com/ru/post/1208190/


All Articles