在使用sudo pip3 install python库的时候出现如下警告:

The directory '/home/lzhu/.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.

解决方案如下:

将 sudo pip3 install 改为 sudo -H pip3 install

Ubuntu 18.04使用sudo pip3报错的更多相关文章

  1. 学习中的错误——ubuntu 14.04 LTS 启动eclipse报错

    在ubuntu中启动eclipse报错:(Eclipse:15978): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assert ...

  2. Ubuntu 14.04下Redis安装报错:“You need tcl 8.5 or newer in order to run the Redis test”问题解决

    Redis简介: Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的开发工 ...

  3. Ubuntu 18.04 下安装pip3及pygame模块

    1.Ubuntu下pip3的安装.升级.卸载 安装pip3 sudo apt-get install python3-pip 升级pip3 sudo pip3 install --upgrade pi ...

  4. Ubuntu 16.04 LTS运行robo3t报错

    系统环境:Ubuntu 16.04 LTS. 安装robomongo Robo 3T,运行时报以下错误: jaxu@jaxu-ubuntu:/usr/local/share/robo3t--linux ...

  5. ubuntu 14.04 解决apt-get update报错

    apt-get update 报如下错误: 忽略 http://cn.archive.ubuntu.com trusty-backports/multiverse Translation-zh 忽略 ...

  6. Ubuntu 16.04.3启动MySQL报错

    今天安装mysql,连接MySQL时报错mysql: [Warning] Using a password on the command line interface can be insecure. ...

  7. 执行sudo pip3 ...报错 Traceback (most recent call last): File "/usr/bin/pip3", line 9, in <module> from pip import main ImportError: cannot import name 'main'

    对于普通pip,把pip3改成pip即可,其他的修改一样 1.执行命令 sudo gedit /usr/bin/pip3 2.改成下面的形式 from pip import __main__ # 需要 ...

  8. ubuntu 18.04 关掉sudo密码

    关掉sudo密码 $ sudo visudo 找到如下行 %sudo ALL=(ALL:ALL) ALL 修改为 %sudo ALL=(ALL:ALL) NOPASSWD:ALL 这样sudo用户组的 ...

  9. ubuntu 12.04 rails server 时候报错 execjs

    新的应用创建好了,使用rails server启动看看,oops!原来是没有javascript运行环境. 1 2 $ rails server  /usr/local/lib/ruby/gems/1 ...

随机推荐

  1. 7、JPA-映射-双向一对多

    一个用户对应多个订单,多个订单对应一个用户,不管查哪一边都可以得到另一边的信息 实体类 Customer package com.jpa.yingshe; import javax.persisten ...

  2. Kafka权威指南 读书笔记之(三)Kafka 生产者一一向 Kafka 写入数据

    不管是把 Kafka 作为消息队列.消息总线还是数据存储平台来使用 ,总是需要有一个可以往 Kafka 写入数据的生产者和一个从 Kafka 读取数据的消费者,或者一个兼具两种角色的应用程序. 开发者 ...

  3. Redis学习笔记(二)解析dump.rdb文件工具之redis-rdb-tools

    https://github.com/sripathikrishnan/redis-rdb-tools 我这里使用docker搭建 docker搭建文档 https://rdbtools.com/do ...

  4. Django-GET和POST小记

    import requests requests.get(url='xxx') # 本质上就是: requests.request(method='get',url='xxx') import jso ...

  5. Impala系列: Impala常用的功能函数

    --=======================查看内置的函数--=======================hive 不需要进入什么内置数据库, 即可使用 show functions 命令列出 ...

  6. 魔改版BBR

    魔改版bbr加速: wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSp ...

  7. 如何实现从 Redis 中订阅消息转发到 WebSocket 客户端

    PHP 的redis扩展是阻塞式 IO ,使用订阅/发布模式时,会导致整个进程进入阻塞.因此必须使用Swoole\Redis异步客户端来实现. 实例代码 $server = new swoole_we ...

  8. list vector map set (转)

    List封装了链表,Vector封装了数组, list和vector得最主要的区别在于vector使用连续内存存储的,他支持[]运算符,而list是以链表形式实现的,不支持[]. Vector对于随机 ...

  9. sql 左右连接 on 之后的and 和where的区别

  10. python 的基础 学习 11天 作业题

    1.整理函数相关知识点,写博客 2.写函数,检查获取传入列表或元组对象的所有奇数位索引对应的元素,并将其作为新列表返回给调用者. def func1(argv): li = [] for i in r ...