ubuntu@ubuntu:~$ sudo pip install uwsgi

报错:
The directory '/home/ubuntu/.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/ubuntu/.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
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0xb662edcc>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/uwsgi/

Could not find a version that satisfies the requirement uwsgi (from versions: )
No matching distribution found for uwsgi

报错原因:未联网,网络连接设置为了桥接模式,需要把其改为NAT模式,共享主机的IP地址。

附上修改方法:

虚拟机安装ubuntu上网的设置方法,分为主机有线上网和无线上网。

一、有线上网。

  1. 首先完全关闭ubuntu。

  2. 打开虚拟机,找到unbutu,右键“设置”,如图所示。

  3. 然后点“网络适配器”,如图所示。

  4. 如果没有设置过,默认的是NAT,点击确定即可。

二、主机无线上网。

  1. 同样是首先完全关闭ubuntu。

  2. 还是找到unbutu,右键“设置”找到“网络适配器”,如图所示。

  3. 然后勾选“桥接模式”确定即可,如图所示。

  4. 最后打开ubuntu,已经可以上网了。

Ubuntu上pip安装uwsgi失败的原因之一(未联网)的更多相关文章

  1. Ubuntu上如何安装Java,Eclipse,Pydev,Python(自带,不用装),BeautifulSoup

    如何安装Java,如果出于编程的需要安装Java,需要安装的是JDK,而不仅仅是JRE,下面说说如何在Ubuntu下如何安装JDK:只有两步,1.下载并解压,2.配置环境变量1.下载并解压:下载地址: ...

  2. pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in

    问题 Mac 下通过 pip 安装 icu 失败. 解决办法及原因 问题的原因是因为icu库中的某一行代码找不到一个文件,获取不到ICU_VERSION的值. # Install icu brew i ...

  3. 手把手教你在Ubuntu上分别安装Nginx、PHP和Mysql

    手把手教你在Ubuntu上分别安装Nginx.PHP和Mysql

  4. windows上pip安装及使用详解

    windows上pip安装及使用详解 2018-11-21 19:49:58 十二笔 阅读数 8229更多 分类专栏: Python学习   版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA ...

  5. Ubuntu16.04上使用Anaconda3的Python3.6的pip安装UWSGI报错解决办法

    具体报错信息: lto1: fatal error: bytecode stream generated with LTO version 6.0 instead of the expected 4. ...

  6. centos下python3.6安装uwsgi失败。

    报错信息(省略大部分): plugins/python/uwsgi_python.h::: fatal error: Python.h: No such file or directory #incl ...

  7. 阿里云ECS Ubuntu16.0 安装 uwsgi 失败解决方案

    Ubuntu安装包时报错 E:Unable to locate package xxx(如:python3-pip) 一般新安装Ubuntu后需要先更新软件源: apt-get update apt- ...

  8. 5.python之pip安装模块失败

    本文是篇水文,主要是在学习python过程中总是遇到使用pip安装一些模块失败,记录一下安装模块解决办法 第一种方法: 首先安装wheel模块: pip install wheel 如果wheel都安 ...

  9. python pip安装lxml失败(转)

    今天想要试试beautifulsoup4,安装的时候很顺利,然后就准备安装lxml作为解析器,没想到安装时pip直接给我报了一整页的错误. 解决过程 查看了一下错误提示,其中有如下一段: ****** ...

随机推荐

  1. EF6 DbModelBuilder

    protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Entity<Produc ...

  2. 【LeetCode】236. Lowest Common Ancestor of a Binary Tree

    Lowest Common Ancestor of a Binary Tree Given a binary tree, find the lowest common ancestor (LCA) o ...

  3. SED单行脚本快速参考(Unix 流编辑器)(转)

    sed.sourceforge.net被封杀,特在此处贴上官方的sed 使用说明文档 SED单行脚本快速参考(Unix 流编辑器) 2005年12月29日 英文标题:USEFUL ONE-LINE S ...

  4. DIOCP-V5发布

    DIOCP-v5开源项目 https://github.com/ymofen/diocp-v5   DIOCP-v5 0.0.1   2015-02-22 08:40:40 1.规范单元文件的命名,和 ...

  5. sql1032n sql6048n db2start启动不了 db2修改hostname

    今天下午把虚拟机上的linux的hostanme改掉了 结果启动DB2的时候发生了这样的错误 SQL6048N  A communication error occurred during START ...

  6. Android Gallery实现3D相册(附效果图+Demo源码)

    今天因为要做一个设置开机画面的功能,主要是让用户可以设置自己的开机画面,应用层需要做让用户选择开机画面图片的功能.所以需要做一个简单的图片浏览选择程序.最后选用Gallery作为基本控件.加入了一些炫 ...

  7. java.util.concurrent介绍【转】

    java.util.concurrent介绍   java.util.concurrent 包含许多线程安全.测试良好.高性能的并发构建块.不客气地说,创建 java.util.concurrent ...

  8. java反编译工具(Java Decompiler)

    1,下载地址,包括GUI,Eclipse插件 http://jd.benow.ca/ 2,Eclipse插件的安装参看 https://blog.csdn.net/yh_zeng2/article/d ...

  9. 教你一招:windows批处理中实现延时的办法

    五种方法可以实现批出里的延时,推荐使用方法一,该方法也是使用最多的. 方法一 用ping命令延迟(这是最简单而且是最常见的): @echo off echo "use ping to del ...

  10. jquery checkbox checked 却不显示对勾

    $("input").attr("checked", true); 或 $("input").attr("checked" ...