pip错误-failed to create process/fatal error in launcher

电脑同时装了python2和python3,并且都配置了环境变量

将python2的python.exe改成python2.exe,python3的python.exe没有改(主要用python2时则可改python3的exe)


命令行里输入python,python2会进入对应的python版本


但输入pip2会报错: failed to create process


可改成 python2 -m pip  就ok了,后面就可以接pip的各种命令


用pip2安装包时:

python2 -m pip install pack_name
python2 -m pip install numpy pandas  

运行脚本时:

#!python2 #要写在文件编码声明前
# -*-coding:utf-8 -*-

由于某种原因,下载了python3.6又卸载后,再重新下python3.5 

按照上面重新改好python2,python3后,输入pip,pip2,pip3,都会报错

pip报错:fatal error in launcher:unable to create using process时

python2 -m pip install --upgrade pip
python -m pip install --upgrade pip

再试一遍,发现完美解决了,pip,pip2,pip3都不会报错了。


猜你喜欢

转载自blog.csdn.net/meowing/article/details/79896925
今日推荐