zoukankan      html  css  js  c++  java
  • Python3 pip出现Fatal error in launcher: Unable to create process using '"'

    Python3 pip出现Fatal error in launcher: Unable to create process using '"'

    问题分析:    

    先python2又安装了python3,然后安装了pip,卸载了python3后pip不可用,重新安装pip无果(反之亦然)。

    根因在于,安装pip时windows在环境变量:path中添加了到pip命令的路径,先前的pip路径未清除,导致后面重新安装的pip未生效。

    解决方案:    

    查看pip命令是否有重复路径,cmd命令:where pip。    

    从结果中,可以看到会存在两个路径,其中一个为python3.x的路径,一个为python2.x的路径。  

    拷贝环境变量path到txt中,去掉有关python3.x的相关路径,保存,重新开个控制台,输入pip,可以看到help信息,问题完美解决。

    多版本pip用法:

    那么,有人环境中的确存在两个版本的python,并且都安装了pip,

    那么,如何为指定版本的python用pip安装包呢?

    方法如下:

    python2 -m pip install xxx

    or

    python3 -m pip install xxx

    通过指明python版本来调用对应的pip程序。 

  • 相关阅读:
    Leetcode: Surrounded Regions
    Leetcode: 3Sum Closest
    Leetcode: 3Sum
    Leetcode: Wildcard Matching
    Leetcode: Edit Distance
    Leetcode: Best Time to Buy and Sell Stock III
    Leetcode: Combination Sum II
    Leetcode: Next Permutation
    Leetcode: Merge Intervals
    Leetcode: Minimum Window Substring
  • 原文地址:https://www.cnblogs.com/lizm166/p/9686725.html
Copyright © 2011-2022 走看看