如何强制彻底重建Python sou

2024-04-20 09:39:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我在主目录中构建了python3.7.0,然后将python目录移动了“mv ~/p37 ~/python37

移动之后,我运行以下操作:

make distclean
configure --prefix=~/python37/install 
make
make install

Python可执行文件可以工作,但pip不能。我得到错误:

pip bad interpreter: no such file or directory /home/me/p37/install/bin

错误的原因是,这里是pip的顶行:

#!/home/me/p37/install/bin/python3.7

所以,即使在我运行了“make distclean”之后,似乎pip还是没有更新

是的,我可以“rm -fr install”,但是我想知道如果我想强制一个完全的重新构建,运行configure和make的正确方法是什么


Tags: installpip目录homeprefixmakebinconfigure