pip找不到问题:error: Couldn't find a setup script in C:\Users\xxxx\pip和 Permission Error:[WinError 5] 拒绝访

问题:

在conda使用pip安装TensorFlow和其他包的时候报错:

  • Permission Error:[WinError 5] 拒绝访问。:'d:\anaconda3\envs\tensorflow\scripts\pip.exe’
  • error: Couldn’t find a setup script in C:\Users\xxx\pip
    在这里插入图片描述
    在这里插入图片描述

原因:

上述的两个问题都可以归结于pip不在你的环境路径内,此处我推荐用easy_install解决该问题

解决方法:

  • 查找资料原因是pip找不到,用easy_install pip命令修复,结果发现又还找不到easy_install
  • 解决找不到easy_install:
    • 进入到你的安装Anaconda下的anaconda3\envs\环境名称\scripts\

    • 看到有easy_install.exe文件
      在这里插入图片描述

    • 然后按住Shift然后右击文件夹空白处,找到在此处打开PowerShell窗口,点击进入

    • 输入easy_install.exe pip回车

    • 此时自动开始修复,时间2-3分钟(根据网络情况)

    • 然后看到Finished processing dependencies for pip 说明修复完成,回去即可正常使用pip安装你需要的包了
      在这里插入图片描述

发布了13 篇原创文章 · 获赞 8 · 访问量 1728

猜你喜欢

转载自blog.csdn.net/qq_30722795/article/details/103231442