Ubuntu pip3安装uwsgi报错

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

[email protected]:~$ 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.
[email protected]:~$ 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

时间: 2024-07-30 10:29:44

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

pip3安装Crypto报错ModuleNotFoundError: No module named 'Crypto'

问题: pip3 install Crypto后 仍报错 ModuleNotFoundError: No module named 'Crypto' 解决办法: 1.进入存放Crypto的目录看下他在不在 cd /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages ls 2.发现没有Crypto,只有crypto ??‍♀? 直接重命名文件改为Crypto mv crypto Crypto 思考

[Python] Windows上通过pip安装uwsgi报错

错误提示: AttributeError: module 'os' has no attribute 'uname' 原因: 因为os.uname()是linux的方法,在window上不可用,platform模块则支持任何系统 解决办法: 下载uwsgi离线安装 1.https://pypi.python.org/pypi/uWSGI/下载你想要的uwsgi 压缩文件 2.在你需要用它的python文件的site-packages文件中解压缩 3.找到uwsgiconfig.py配置文件 4.

ubuntu pip 安装django报错解决

系统版本 ubuntu  Kylin 16.04 LTS       安装pip3 安装 Django 总是提示time out,无法安装. 逛了好多论坛终于遭到了解决办法,分享保存: sudo pip3 install -i https://pypi.doubanio.com/simple/ 包名(django) 还有其他的解决方案,如修改配置文件 [global]块,的超时时间等

linux安装uwsgi,报错问题解决

uwsgi安装 uwsgi启动后出 -- unavailable modifier requested: 0 出现问题的的原因是找不到python的解释器(其他语言同理) 你使用的yum install uwsgi 或者 apt-get install uwsgi 安装了uwsgi(我就是这样遇到了这个问题) 解决办法 用 pip install uwsgi  或者 pip3 install uwsgi  安装uwsgi(uwsgi默认安装在/usr/local/python3/bin/) 实行

pip3安装cv2报错

Traceback (most recent call last):  File "/usr/bin/pip", line 11, in <module>    sys.exit(main())  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main    locale.setlocale(locale.LC_ALL, '')  File "/usr

Ubuntu安装Sqlite报错:No module named &#39;ConfigParser&#39;

安装命令:`sudo apt install sqlite` 原因,我把系统默认的python版本改为了python3 改为python2即可,用update-alternatives命令,见此文(方法2):http://blog.csdn.net/u011534057/article/details/51615193 Ubuntu安装Sqlite报错:No module named 'ConfigParser' 原文地址:https://www.cnblogs.com/qrlozte/p/85

Centos安装fabric 报错:error: ‘FFI_DEFAULT_ABI’ undeclared (first use in this function)

Centos安装fabric 报错: error: 'FFI_DEFAULT_ABI' undeclared (first use in this function) 需要安装libffi-devel Debian或Ubuntu需要安装 libffi-dev

Ubuntu下build wxPython报错

Ubuntu下build wxPython报错configure: error: GStreamer not available 百度到如下页面http://wxpython-users.1045709.n5.nabble.com/Linux-configure-fails-on-GStreamer-td3271417.html 执行如下命令后正常 sudo apt install  python-gst0.10-dev 结果虽然用"./configure && make &am

烂泥:【解决】ubuntu使用远程NFS报错

本文由秀依林枫提供友情赞助,首发于烂泥行天下. 今天在ubuntu系统上使用远程NFS,发现一直报错无法使用. 查看NFS挂载命令没有错误,命令如下: mount -t nfs 192.168.1.11:/data/work/soft/iso /home/lianzhou/iso 查看相关资料说,因为ubunutu14默认是没有安装NFS客户端的,需要安装NFS客户端. 安装NFS客户端,使用如下命令: sudo apt-get –y install nfs-common 安装完毕后,再次使用m