Jump to content

User:Danmichaelo/uwsgi

From Wikitech
$ python3 -m venv www/python/venv
$ . www/python/venv/bin/activate
$ pip install --upgrade setuptools pip wheel greenlet flask
$ pip install Flask-uWSGI-WebSocket
[]
Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 Werkzeug-0.15.2 click-7.0 flask-1.0.2 greenlet-0.4.15 itsdangerous-1.1.0 pip-19.0.3 setuptools-41.0.0 wheel-0.33.1


$ pip install Flask-uWSGI-WebSocket
Collecting Flask-uWSGI-WebSocket
Collecting uwsgi (from Flask-uWSGI-WebSocket)
  Using cached https://files.pythonhosted.org/packages/e7/1e/3dcca007f974fe4eb369bf1b8629d5e342bb3055e2001b2e5340aaefae7a/uwsgi-2.0.18.tar.gz
Requirement already satisfied: Flask in ./www/python/venv/lib/python3.5/site-packages (from Flask-uWSGI-WebSocket) (1.0.2)
Requirement already satisfied: itsdangerous>=0.24 in ./www/python/venv/lib/python3.5/site-packages (from Flask->Flask-uWSGI-WebSocket) (1.1.0)
Requirement already satisfied: Werkzeug>=0.14 in ./www/python/venv/lib/python3.5/site-packages (from Flask->Flask-uWSGI-WebSocket) (0.15.2)
Requirement already satisfied: Jinja2>=2.10 in ./www/python/venv/lib/python3.5/site-packages (from Flask->Flask-uWSGI-WebSocket) (2.10.1)
Requirement already satisfied: click>=5.1 in ./www/python/venv/lib/python3.5/site-packages (from Flask->Flask-uWSGI-WebSocket) (7.0)
Requirement already satisfied: MarkupSafe>=0.23 in ./www/python/venv/lib/python3.5/site-packages (from Jinja2>=2.10->Flask->Flask-uWSGI-WebSocket) (1.1.1)
Building wheels for collected packages: uwsgi
  Building wheel for uwsgi (setup.py) ... error
  Complete output from command /mnt/nfs/labstore-secondary-tools-project/ukbot/www/python/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-im4f3lq8/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 /tmp/pip-wheel-t2u07ua6 --python-tag cp35:
  /usr/lib/python3.5/distutils/dist.py:261: 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.linux-x86_64/wheel
  running install
  using profile: buildconf/default.ini
  detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/6/include', '/usr/local/include', '/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed', '/usr/include/x86_64-linux-gnu', '/usr/include']
  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 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY  -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 -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -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(ugreen);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(ugreen);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 0][x86_64-linux-gnu-gcc -pthread] core/notify.o
  [thread 2][x86_64-linux-gnu-gcc -pthread] core/protocol.o
  [thread 7][x86_64-linux-gnu-gcc -pthread] core/socket.o
  [thread 5][x86_64-linux-gnu-gcc -pthread] core/logging.o
  [thread 1][x86_64-linux-gnu-gcc -pthread] core/master.o
  [thread 4][x86_64-linux-gnu-gcc -pthread] core/master_utils.o
  [thread 3][x86_64-linux-gnu-gcc -pthread] core/emperor.o
  [thread 6][x86_64-linux-gnu-gcc -pthread] core/utils.o
  sh: 1: Cannot fork

  ----------------------------------------
  Failed building wheel for uwsgi
  Running setup.py clean for uwsgi
Failed to build uwsgi
Installing collected packages: uwsgi, Flask-uWSGI-WebSocket
  Running setup.py install for uwsgi ... error
    Complete output from command /mnt/nfs/labstore-secondary-tools-project/ukbot/www/python/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-im4f3lq8/uwsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-0_nqdhpp/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/nfs/labstore-secondary-tools-project/ukbot/www/python/venv/include/site/python3.5/uwsgi:
    /usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'descriptions'
      warnings.warn(msg)
    running install
    using profile: buildconf/default.ini
    detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/6/include', '/usr/local/include', '/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed', '/usr/include/x86_64-linux-gnu', '/usr/include']
    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 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY  -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 -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -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(ugreen);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(ugreen);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 ***
    core/utils.o is up to date
    core/protocol.o is up to date
    core/socket.o is up to date
    core/logging.o is up to date
    core/master.o is up to date
    core/master_utils.o is up to date
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/emperor.o
    core/notify.o is up to date
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/mule.o
    [thread 6][x86_64-linux-gnu-gcc -pthread] core/subscription.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/stats.o
    [thread 4][x86_64-linux-gnu-gcc -pthread] core/sendfile.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/fifo.o
    [thread 7][x86_64-linux-gnu-gcc -pthread] core/async.o
    [thread 5][x86_64-linux-gnu-gcc -pthread] core/master_checks.o
    sh: 1: Cannot fork

    ----------------------------------------
Command "/mnt/nfs/labstore-secondary-tools-project/ukbot/www/python/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-im4f3lq8/uwsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-0_nqdhpp/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/nfs/labstore-secondary-tools-project/ukbot/www/python/venv/include/site/python3.5/uwsgi" failed with error code 1 in /tmp/pip-install-im4f3lq8/uwsgi/