-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在Mac10.13.4 Python3.7.0下安装失败 #172
Comments
什么情况是因为系统版本问题吗 ? error: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.12" but "10.13" during configure |
文档里说 Mac系统出现版本问题使用 MACOSX_DEPLOYMENT_TARGET=10.13 python setup.py install试试? |
文档里没说支持python3.7,还真是不支持,用python2.7/3.6装没问题. 有个奇怪的问题是python2.7装可以自动检测到 MACOSX_DEPLOYMENT_TARGET是否与OS版本匹配,setup.py里改成相应的就行(我的10.14),而python3.6/3.7会忽视setup.py里的值,无论如何都置MACOSX_DEPLOYMENT_TARGET=10.7 |
@GeekTemo 加强制转换 (void *) 能解决 |
使用python3.6版本,并将setup.py中的的MACOSX_DEPLOYMENT_TARGET=10.13 具体的mac版本需要自己寻找,可以解决从源码中安装失败的现象 |
@menghuu 前面提过python3.6/2.7都没问题,方案是针对python3.7 conda 环境失败的解决方案。 |
linux系统也可以这样解决,赞👍 |
|
系统版本 MacOs High Sierra 10.13.4
Python版本 Python 3.7.0
安装方式 git下载安装
错误信息
patch/libs/python/src/converter/builtin_converters.cpp:51:14: error: cannot initialize return object of type 'void *' with an rvalue of type 'const char *' return PyUnicode_Check(obj) ? _PyUnicode_AsString(obj) : 0; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/unicodeobject.h:363:18: note: expanded from macro 'PyUnicode_Check' PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) ^ /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/object.h:686:35: note: expanded from macro 'PyType_FastSubclass' #define PyType_FastSubclass(t,f) PyType_HasFeature(t,f) ^ /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/object.h:684:33: note: expanded from macro 'PyType_HasFeature' #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) ^ 1 error generated. error: command 'clang++' failed with exit status 1
试过之前的 #52 的方法 还是失败。
The text was updated successfully, but these errors were encountered: