pip安装uwsgi失败,出现/usr/local/include/string/string.h:7:10:致命错误:找不到“ sstream”文件?

我正在尝试使用 python2.7 macOS-10.14.5 上的virtualenv中安装uwsgi。 我收到此错误/usr/local/include/string/string.h:7:10: fatal error: 'sstream' file not found

我尝试更新xcode-select --installbrew upgrade gccbrew doctor并安装所有其他必需的软件包。 但仍然出现此错误 整个堆栈跟踪如下所示:

Collecting uwsgi
  Using cached https://files.pythonhosted.org/packages/e7/1e/3dcca007f974fe4eb369bf1b8629d5e342bb3055e2001b2e5340aaefae7a/uwsgi-2.0.18.tar.gz
Building wheels for collected packages: uwsgi
  Building wheel for uwsgi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/nsonic001/work/moengage/dp_env/bin/python2.7 -u -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/private/var/folders/_g/_2hk83bn59g951v5spyk51cm0000gn/T/pip-install-pH6j2G/uwsgi/setup.py'"'"'; __file__='"'"'/private/var/folders/_g/_2hk83bn59g951v5spyk51cm0000gn/T/pip-install-pH6j2G/uwsgi/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 /private/var/folders/_g/_2hk83bn59g951v5spyk51cm0000gn/T/pip-wheel-mgCqqd --python-tag cp27
       cwd: /private/var/folders/_g/_2hk83bn59g951v5spyk51cm0000gn/T/pip-install-pH6j2G/uwsgi/
  Complete output (31 lines):
  /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  copying uwsgidecorators.py -> build/lib
  installing to build/bdist.macosx-10.14-x86_64/wheel
  running install
  using profile: buildconf/default.ini
  detected include path: ['/usr/local/include','/library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include','/library/Developer/CommandLineTools/usr/include','/usr/include','/System/library/Frameworks','/library/Frameworks']
  Patching "bin_name" to properly install_scripts dir
  detected CPU cores: 8
  configured CflaGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-format -Wno-format-security -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -mmacosx-version-min=10.5 -DUWSGI_LOCK_USE_OSX_SPINLOCK -DUWSGI_EVENT_USE_KQUEUE -DUWSGI_EVENT_TIMER_USE_KQUEUE -DUWSGI_EVENT_FIlemonITOR_USE_KQUEUE -I/usr/local/Cellar/pcre/8.37/include -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_UUID -DUWSGI_VERSION="\"2.0.18\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="18" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -DUWSGI_XML -DUWSGI_XML_EXPAT -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DeclARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"
  *** uWSGI compiling server core ***
  [thread 1][clang] core/utils.o
  [thread 2][clang] core/protocol.o
  [thread 3][clang] core/socket.o
  [thread 4][clang] core/logging.o
  [thread 6][clang] core/master.o
  [thread 5][clang] core/master_utils.o
  [thread 0][clang] core/emperor.o
  [thread 7][clang] core/notify.o
  In file included from core/utils.c:1:
  In file included from ./uwsgi.h:187:
  In file included from /usr/local/include/string.h:6:
  /usr/local/include/string/string.h:7:10: fatal error: 'sstream' file not found
  #include <sstream>
           ^~~~~~~~~
  1 error generated.
  ----------------------------------------
  ERROR: Failed building wheel for uwsgi
  Running setup.py clean for uwsgi
Failed to build uwsgi
ERROR: commons-pp 2.4.0 requires amazon-dax-client==1.1.0,which is not installed.
ERROR: commons-pp 2.4.0 requires apscheduler==3.2.0,which is not installed.
ERROR: commons-pp 2.4.0 requires atomiclong==0.1.1,which is not installed.
ERROR: commons-pp 2.4.0 requires awscli==1.16.87,which is not installed.
ERROR: commons-pp 2.4.0 requires blosc==1.4.1,which is not installed.
ERROR: commons-pp 2.4.0 requires boto==2.49.0,which is not installed.
ERROR: commons-pp 2.4.0 requires boto3==1.9.77,which is not installed.
ERROR: commons-pp 2.4.0 requires botocore==1.12.77,which is not installed.
ERROR: commons-pp 2.4.0 requires celery<=3.1.26.post2,>=3.1,which is not installed.
ERROR: commons-pp 2.4.0 requires enum34==1.1.3,which is not installed.
ERROR: commons-pp 2.4.0 requires eventlet==0.17.4,which is not installed.
ERROR: commons-pp 2.4.0 requires falcon==1.1.0,which is not installed.
ERROR: commons-pp 2.4.0 requires filechunkio==1.6,which is not installed.
ERROR: commons-pp 2.4.0 requires futures==3.2.0,which is not installed.
ERROR: commons-pp 2.4.0 requires gevent==1.2.1,which is not installed.
ERROR: commons-pp 2.4.0 requires influxdb==4.1.0,which is not installed.
ERROR: commons-pp 2.4.0 requires msgpack-python==0.4.8,which is not installed.
ERROR: commons-pp 2.4.0 requires newrelic<=5.0.0,>=4.8.0,which is not installed.
ERROR: commons-pp 2.4.0 requires paramiko==2.2.4,which is not installed.
ERROR: commons-pp 2.4.0 requires psutil==4.2.0,which is not installed.
ERROR: commons-pp 2.4.0 requires pybloom==1.1,which is not installed.
ERROR: commons-pp 2.4.0 requires pycrypto==2.6.1,which is not installed.
ERROR: commons-pp 2.4.0 requires pygerduty==0.35.1,which is not installed.
ERROR: commons-pp 2.4.0 requires pykafka==2.8.0,which is not installed.
ERROR: commons-pp 2.4.0 requires pymongo==3.6.1,which is not installed.
ERROR: commons-pp 2.4.0 requires redis==2.10.6,which is not installed.
ERROR: commons-pp 2.4.0 requires redis-py-cluster==1.3.2,which is not installed.
ERROR: commons-pp 2.4.0 requires redlock==1.2.0,which is not installed.
ERROR: commons-pp 2.4.0 requires requests==2.18.0,which is not installed.
ERROR: commons-pp 2.4.0 requires sentry-sdk==0.10.2,which is not installed.
ERROR: commons-pp 2.4.0 requires six<=1.12.0,>=1.10.0,which is not installed.
ERROR: commons-pp 2.4.0 requires slacker==0.9.24,which is not installed.
ERROR: commons-pp 2.4.0 requires statsd==3.2.1,which is not installed.
ERROR: commons-pp 2.4.0 requires urllib3==1.21.1,which is not installed.
Installing collected packages: uwsgi
    Running setup.py install for uwsgi ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/nsonic001/work/moengage/dp_env/bin/python2.7 -u -c 'import sys,'"'"'exec'"'"'))' install --record /private/var/folders/_g/_2hk83bn59g951v5spyk51cm0000gn/T/pip-record-_yWiWE/install-record.txt --single-version-externally-managed --compile --install-headers /Users/nsonic001/work/moengage/dp_env/bin/../include/site/python2.7/uwsgi
         cwd: /private/var/folders/_g/_2hk83bn59g951v5spyk51cm0000gn/T/pip-install-pH6j2G/uwsgi/
    Complete output (31 lines):
    /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions'
      warnings.warn(msg)
    running install
    using profile: buildconf/default.ini
    detected include path: ['/usr/local/include','/library/Frameworks']
    Patching "bin_name" to properly install_scripts dir
    detected CPU cores: 8
    configured CflaGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-format -Wno-format-security -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -mmacosx-version-min=10.5 -DUWSGI_LOCK_USE_OSX_SPINLOCK -DUWSGI_EVENT_USE_KQUEUE -DUWSGI_EVENT_TIMER_USE_KQUEUE -DUWSGI_EVENT_FIlemonITOR_USE_KQUEUE -I/usr/local/Cellar/pcre/8.37/include -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_UUID -DUWSGI_VERSION="\"2.0.18\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="18" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -DUWSGI_XML -DUWSGI_XML_EXPAT -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DeclARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"
    *** uWSGI compiling server core ***
    [thread 1][clang] core/utils.o
    [thread 2][clang] core/protocol.o
    [thread 3][clang] core/socket.o
    [thread 4][clang] core/logging.o
    [thread 5][clang] core/master.o
    [thread 6][clang] core/master_utils.o
    [thread 7][clang] core/emperor.o
    [thread 0][clang] core/notify.o
    In file included from core/utils.c:1:
    In file included from ./uwsgi.h:187:
    In file included from /usr/local/include/string.h:6:
    /usr/local/include/string/string.h:7:10: fatal error: 'sstream' file not found
    #include <sstream>
             ^~~~~~~~~
    1 error generated.
    In file included from core/protocol.c:1:
    In file included from ./uwsgi.h:187:
    In file included from /usr/local/include/string.h:6:
    /usr/local/include/string/string.h:7:10: fatal error: 'sstream' file not found
    #include <sstream>
             ^~~~~~~~~
    1 error generated.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/nsonic001/work/moengage/dp_env/bin/python2.7 -u -c 'import sys,'"'"'exec'"'"'))' install --record /private/var/folders/_g/_2hk83bn59g951v5spyk51cm0000gn/T/pip-record-_yWiWE/install-record.txt --single-version-externally-managed --compile --install-headers /Users/nsonic001/work/moengage/dp_env/bin/../include/site/python2.7/uwsgi Check the logs for full command output.

TYCandy 回答:pip安装uwsgi失败,出现/usr/local/include/string/string.h:7:10:致命错误:找不到“ sstream”文件?

我刚刚删除了public bool IsDeleted { get; set; },它可以正常工作。 感谢Link to code指出。 遇到其他问题,但至少可以解决一个问题。

本文链接:https://www.f2er.com/3116385.html

大家都在问