在安装virtualenv时候

pip3 install virtualenv

首先报错 没有权限,然后我按照提示
Consider using the --user option or check the permissions.
运行了pip3 install virtualenv --user下面的报错

The script virtualenv is installed in ‘/Users/shendinghui/Library/Python/3.7/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

在大神的指点下我接下来使用了sudo执行,sudo pip3 install virtualenv
接下来出现报错:

The directory ‘/Users/shendinghui/Library/Caches/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 ‘/Users/shendinghui/Library/Caches/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.

显示该目录或者其父级目录,当前用户没有权限
于是我给这个目录加上可写的权限,使用如下指令:

sudo chown -R yourUserName /Users/yourUserName/Library/Caches/pip/http

PS:
1、sudo是linux系统管理指令,是允许系统管理员让普通用户执行一些或者全部的root命令的一个工具,如halt,reboot,su等等;
2、上面指令中的目录是终端提示中的目录,应该更换为你的终端提示中的目录

执行以上指令后再次执行:

sudo pip install virtualenv

到这里,成功导入啦!

参考https://blog.csdn.net/LQMIKU/article/details/107300116

Mac下导入virtualenv报错:its parent directory is not owned by the current user相关推荐

  1. The directory '*' or its parent directory is not owned by the current user

    使用sudo pip install -的时候出现下面一段warning: WARNING: The directory '/home/alex/.cache/pip/http' or its par ...

  2. mac下的tensorflow报错提示没有models库

    原因:目前tf1.0版本的也就是比较新的版本都将models库剔除,当做第三方库来使用了. 解决方案: 1. 直接重新下载安装 tf的低的版本 2. 手动安装models库 我这里选择的是手动安装mo ...

  3. mac brew 安装php扩展报错:parent directory is world writable but not sticky

    $ brew install php70-mcrypt 报错: Error: parent directory is world writable but not sticky 搜索到github的答 ...

  4. Mac下配置tomcat 报错Cannot run program “/Users/xxxxxxx/Library/Tomcat/bin/catalina.sh“ 解决办法

    Mac下tomcat,调试后报错Cannot run program "/Users/xxxxx/Library/Tomcat/bin/catalina.sh" (in direc ...

  5. 【ES】Mac 下安装ES 报错 Failed to create native process factories for Machine Learning

    1.背景 下载了一个es,然后解压运行报错 (base) lcc@lcc ~$ cd soft/es/elasticsearch-6.8.0/bin/ (base) lcc@lcc bin$ sh e ...

  6. 解决mac下adb devices报错failed to check server version

    背景 首先AS在显示连接设备窗口中显示device support,but ask only supports armeabi-v7a,之前可以正常debug: 其次,使用adb devices时报错 ...

  7. Mac下运行git报错xcrun: error: invalid active developer path ..

    错误:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun ...

  8. idea报错:Parent ‘Unknown:Unknown:Unknown‘ has problems

    导入项目时报错:Parent 'Unknown:Unknown:Unknown' has problems 问题阐述 查看maven的setting.xml文件 值得注意的一点 问题阐述 项目在导入之 ...

  9. Python导入模块报错问题的分析

    在Python代码中导入自定义模块时经常遇到报错问题,并且在PyCharm和命令行中会有不同的表现.本文通过实例分析两种常见的导入错误出现的原因及解决方法. Python版本:3.8 1.相对导入报错 ...

  10. 解决 Maven 报错 Non-resolvable parent POM ... was cached in the local repository, resolution will not be

    解决 Maven 报错 Non-resolvable parent POM ... was cached in the local repository, resolution will not be ...

最新文章

  1. 服务端客户端QA:协作对接沟通流程及优化
  2. Android10.0 Binder通信原理(十一)-Binder总结
  3. PCB模拟地和数字地的处理
  4. typeScript面试必备之-通识七:typeScript中的可索引接口(数组,对象)+类类型接口...
  5. FFmpeg简易播放器的实现5-音视频同步
  6. mysql 漏洞如何修复_Mysql漏洞修复方法思路及注意事项
  7. 浅谈-LINUX 操作系统启动过程
  8. Ubuntu下启动/重启/停止apache服务器
  9. (Java) Md5Utils
  10. python爬虫xpath提取数据_python爬虫的页面数据解析和提取/xpath/bs4/jsonpath/正则(1)...
  11. 《C++ Primer》第五版课后习题解答_第六章(1)(01-07)
  12. 详细解析Linux /etc/shadow文件
  13. 网络初级 关于ensp动态路由rip协议
  14. 中国IT传奇人物柳传志--语录大全
  15. C语言 入门教程||C语言 指针||C语言 字符串
  16. 国内不翻墙调用chatgpt api
  17. CCD相机与普通相机的区别
  18. 百度地图TextureMapView变黑
  19. js诟病Typescript、Java、JavaScript之间的借鉴与总结
  20. 扩展使用.INF文件-制作免安装的绿色软件

热门文章

  1. Compilation failure: Compilation failure
  2. ZlycerQan的 八云蓝(ran )
  3. google map 地图图标大全
  4. 鸿蒙生死印是谁的,逆天邪神:鸿蒙印的器灵还存在,或许云澈将知道些关于远古的秘密...
  5. 拿信用卡套个首付买房子——引火自焚
  6. php apm,apm是什么?
  7. 微信群导出群成员时间数据_教你一招轻松导出微信群名单
  8. 11、深圳经济特区数据条例
  9. 程序员怎样更优雅的接私活赚外快
  10. python学习——matplotlib颜色设置适合论文的配色