Ubuntu pip3安装uwsgi报错

2023-05-16

笔者在ubuntu16.04使用pip3安装uwsgi时报错了,报错信息如下

leslie@leslie-TWS:~$ sudo pip3 ×××tall uwsgi
The directory '/home/leslie/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/leslie/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting uwsgi
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e7/1e/3dcca007f974fe4eb369bf1b8629d5e342bb3055e2001b2e5340aaefae7a/uwsgi-2.0.18.tar.gz (801kB)
    100% |████████████████████████████████| 808kB 11.6MB/s 
Installing collected packages: uwsgi
  Running setup.py ×××tall for uwsgi ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4h91sq06/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" ×××tall --record /tmp/pip-qrj8ag9k-record/×××tall-record.txt --single-version-externally-managed --compile:
    /usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'descriptions'
      warnings.warn(msg)
    running ×××tall
    using profile: buildconf/default.ini
    detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/5/include', '/usr/local/include', '/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed', '/usr/include/x86_64-linux-gnu', '/usr/include']
    Patching "bin_name" to properly ×××tall_scripts dir
    detected CPU cores: 4
    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_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -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_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 1][x86_64-linux-gnu-gcc -pthread] core/utils.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/protocol.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/socket.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/logging.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/master.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/master_utils.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/emperor.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/notify.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/mule.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/subscription.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/stats.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/sendfile.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/async.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/master_checks.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/fifo.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/offload.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/io.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/static.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/websockets.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/spooler.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/snmp.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/exceptions.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/config.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/setup_utils.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/clock.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/init.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/buffer.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/reader.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/writer.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/alarm.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/cron.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/hooks.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/plug×××.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/lock.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/cache.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/daemons.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/errors.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/hash.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/master_events.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/chunked.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/queue.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/event.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/signal.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/strings.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/progress.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/timebomb.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/ini.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/fsmon.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/mount.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/metrics.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/plug×××_builder.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/sharedarea.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/rpc.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/gateway.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/loop.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/cookie.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/querystring.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/rb_timers.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] core/transformations.o
    [thread 3][x86_64-linux-gnu-gcc -pthread] core/uwsgi.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] proto/base.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] proto/uwsgi.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] proto/http.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] proto/fastcgi.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] proto/scgi.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] proto/puwsgi.o
    [thread 2][x86_64-linux-gnu-gcc -pthread] lib/linux_ns.o
    [thread 1][x86_64-linux-gnu-gcc -pthread] core/yaml.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/dot_h.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] core/config_py.o
    *** uWSGI compiling embedded plug××× ***
    [thread 2][x86_64-linux-gnu-gcc -pthread] plug×××/python/pyutils.o
    [thread 0][x86_64-linux-gnu-gcc -pthread] plug×××/python/python_plugin.o
    In file included from plug×××/python/python_plugin.c:1:0:
    plug×××/python/uwsgi_python.h:2:20: fatal error: Python.h: 没有那个文件或目录
    compilation terminated.
    In file included from plug×××/python/pyutils.c:1:0:
    plug×××/python/uwsgi_python.h:2:20: fatal error: Python.h: 没有那个文件或目录
    compilation terminated.

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4h91sq06/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" ×××tall --record /tmp/pip-qrj8ag9k-record/×××tall-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-4h91sq06/uwsgi/
You are using pip version 8.1.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip ×××tall --upgrade pip' command.
leslie@leslie-TWS:~$ sudo pip3 un×××tall uwsgi
The directory '/home/leslie/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Cannot un×××tall requirement uwsgi, not ×××talled
The directory '/home/leslie/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
You are using pip version 8.1.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip ×××tall --upgrade pip' command.

最后解决方法如下

sudo apt-get ×××tall -y python3-dev

转载于:https://blog.51cto.com/14284354/2409304

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Ubuntu pip3安装uwsgi报错 的相关文章

随机推荐

  • 解决www.github.com访问太慢的问题

    解决www github com访问太慢的问题 使用www github com的过程中 xff0c 有时候打开会特别的慢 xff0c 原因github com的域名被一堵伟大的墙挡在了外面 但是我们可以通过修改本机的hosts文件来修改这
  • 国内有哪些好的刷题网站?

    http www zhihu com question 25574458 Luau Lawrence xff0c Data Mining 弱鸡 PhD 64 NTU 温梦强 石一帆 知乎用户 等人赞同 Welcome To PKU Judg
  • 使用update命令来修改Mysql的root密码

    1 xff0c 使用update命令来修改Mysql的root密码 使用Mysql update命令既可以修改root的老密码 xff0c 也可设置root的密码为空 xff0c 如果使用update命令更改root的密码 xff0c 需要
  • 设置 java -jar 的进程显示名称

    有时候我们会用 nohup java jar xxx jar 来将一些可执行的java application挂在后台 xff0c 类似windows服务一样来运行 但是有一个不爽的地方 xff0c 在linux终端里用jps 显示时 xf
  • linux下修改hostid

    linux下修改hostid 网上有很多版本 xff0c 总结了这几点 1 gt 一个以16进制显示的int字符串 xff1b 2 gt 配置文件 etc hostid 如果有值 xff0c 输出 xff0c 结束 3 gt 从hostna
  • 21分钟学会写编译器

    本文来自网易云社区 知乎上有一种说法是 编译器 图形学 操作系统是程序员的三大浪漫 先不管这个说法是对是错 xff0c 我们假设一个程序员在国内互联网公司写代码 xff0c 业余时间不看相关书籍 那么三年之后 xff0c 他的这些知识会比在
  • 解决idea打包出现中文乱码的问题

    这主要是maven编译时编码问题导致的 在Intellij的settings中maven的runner配置中将原有的配置 DarchetypeCatalog 61 internal修改设置它的VM Options为 DarchetypeCa
  • 局部使用element-ui自定义主题实践

    背景 内部系统虽然使用了element ui xff0c 但同时又混杂了多种风格的样式和各自写的通用组件 xff0c 在参与新功能开发时 xff0c 产品经理的设计需要以绿色为主题色 xff0c 看到element官网有个自定义主题 xff
  • windows server 2012 R2 远程桌面授权模式尚未配置

    windows server 2012 R2 远程桌面授权模式尚未配置 xff0c 远程桌面服务将在120天内停止工作 如何破解这个宽限期 xff0c 目前企业7位协议号码均不包含2012 R2以上授权 那么只能蛋疼的 破解 咯 解决方法
  • LPAD

    语法 span class pln style color rgb 0 0 0 VARCHAR LPAD span span class pun style color rgb 102 102 0 span span class pln s
  • Python 之 sqlalchemy更新数据

    表结构 xff1a 代码 xff1a Author Kang import sqlalchemy from sqlalchemy import create engine from sqlalchemy ext declarative im
  • php curl 设置请求头headers和请求体body

    2019独角兽企业重金招聘Python工程师标准 gt gt gt 啥也不说 xff0c 直接上代码 我这里是post请求 url 61 34 http www example com 34 headers数组内的格式 headers 61
  • 华为路由器双出口负载均衡+备份

    一个网段内 xff0c IP地址 xff08 末位奇数 xff09 走电信 xff0c IP地址 xff08 末位偶数 xff09 走联通 当某个运营商不可达时 xff0c 自动切换 通过NQA来确定运营商是否可达 xff0c 并与流行为
  • office2013VOL版下载资源链接

    office2013VOL版下载资源链接 软件名称 xff1a office2013VOL软件大小 xff1a 914 5 810 7 713 3 801 2 M 软件语言 xff1a 简中软件性质 xff1a 免费 xff08 需要mak
  • 使用 TRY/CATCH 语句解决 SQL Server 2005 死锁

    对于今天的 RDBMS 体系结构而言 xff0c 死锁难以避免 在高容量的 OLTP 环境中更是极为普遍 正是由于 NET 的公共语言运行库 CLR 的出现 xff0c SQL Server 2005 才得以为开发人员提供一种新的错误处理方
  • delphi之找色和色块

    找色和色块 xff0c 是模拟的重要基础 有时候 xff0c 需要确定某点是否出现某种颜色 xff0c 有时候需要判断色块是否出现在某位置 有时候 xff0c 需要看范围内是否出现色块 function IsColor bmp TBitma
  • 局域网组建(二) OpenWrt作为一般节点接入WireGuard组建的跨地域局域网

    本实验将OpenWrt作为一般节点 xff08 不提供网关功能的客户端 xff09 接入WireGuard组建的跨地域局域网 xff0c 实现与局域网内其他机器的通信 由于OpenWrt也具备NAT功能 xff0c 因此OpenWrt下的设
  • 简历上如果出现过于高大上的项目,反而过犹不及:再论如何通过项目引出技术...

    我看了前几天些的博文 xff0c 分析若干没面试机会和没体现实力的简历 xff0c 就想起了做技术面试官时的一些往事 我见过有些简历 xff0c 上面列出的项目描述非常高大上 xff0c 比如用到了xx机器学习技术 xff0c 或者在一个项
  • VNC 服务器配置和调试 含 VNC同步TTY7

    RHCE 学习笔记 VNC 服务器配置和调试 服务包 xff1a Server xff1a vnc server 4 1 2 14 el5 3 1 vnc 4 1 2 14 el5 3 1 Client vnc 4 1 2 14 el5 3
  • Ubuntu pip3安装uwsgi报错

    笔者在ubuntu16 04使用pip3安装uwsgi时报错了 xff0c 报错信息如下 leslie 64 leslie TWS sudo pip3 tall uwsgi The directory 39 home leslie cach