概述
所有的作死行为都要从我的电脑出问题说起,就在之前由于电脑出现严重的卡顿,我简单检测了一下我的硬件,发现是我的硬盘坏道了,所以就重新买了一个新的更大的盘。然后装了系统(有教程,见我另一篇文章【系统 win10 deepin】双系统安装(win10和deepin双系统))。
然而数据就成了最大的问题,像python这样的能直接移动就能用的我果断采取了移动,然而,这就出现了pip不能用的问题,自己在网上也找了很多的解决方案,虽然也有替代方法(文末),但本着不作就不会死的态度,我就是想用pip,怎么着吧。
壹:问题描述
在移动python安装路径后,使用pip出现以下问题,其中的路径就是我之前的python的安装路径。
Fatal error in launcher: Unable to create process using '"e:\lomtom_stu\python3.7.6\python.exe" "E:\Program\Python3.7.6\Scripts\pip.exe" list': ???????????

贰:解决过程
一、然后我就确认python是否可用,输入python --version
确认python是可以用的,更何况我已经跑过python项目了,怎么可能不能用呢。

二、既然是pip出问题了,那么我直接把pip从python中卸载重装不就行了(这不是废话吗)
1、卸载pip
中间需要确认,输入y就可以了。
python -m pip uninstall pip

2、安装pip
1、要安装pip,请通过以下链接安全下载1get-pip.py:get-pip.py。或者,使用curl:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
2、然后在下载的文件夹中运行以下命令get-pip.py:
python get-pip.py

3、测试
pip list

ok,问题解决,愉快的玩耍python与pip吧。
叁:作者有话
pip是Python 的软件包安装程序。
你可以通过pip对 Python 包实现查找、下载、安装、卸载的功能。
并且,在安装系统之后,如果需要对数据做迁移时,如果不想遇到这样类似的麻烦,想python这样的开发环境,能安装的还是尽量安装吧。
替代方案:
在pip install 前加入 python -m 就可以达到一样的效果
python -m pip install 包名
网友评论