gpt4 book ai didi

python - 卸载从源代码构建的 PIL

转载 作者:太空狗 更新时间:2023-10-29 12:18:45 26 4
gpt4 key购买 nike

我使用本教程来安装 PIL。现在,我想卸载它并在其位置安装 pillow

mkdir -p ~/src ~/lib/python2.7
cd ~/src
wget http://effbot.org/media/downloads/PIL-1.1.7.tar.gz
tar zxf PIL-1.1.7.tar.gz
cd PIL-1.1.7
python2.7 setup.py build_ext -i
python2.7 setup.py install

如何卸载 PIL?

PS:我还没有在我的任何 virtualenvs 中安装 PIL。它是全局安装。但是,我在所有项目中都使用 virtualenvs。

最佳答案

从 Ubuntu 14.04 开始工作,但这应该是普遍适用的。安装时,我调用了以下命令:

sudo python setup.py install

我注意到以下描述默认安装的语句:

...
Installing pildriver.py script to /usr/local/bin
Installing viewer.py script to /usr/local/bin
Installing gifmaker.py script to /usr/local/bin
Installing painter.py script to /usr/local/bin
Installing pilfont.py script to /usr/local/bin
Installing pilprint.py script to /usr/local/bin
Installing pilconvert.py script to /usr/local/bin
Installing enhancer.py script to /usr/local/bin
Installing pilfile.py script to /usr/local/bin
Installing createfontdatachunk.py script to /usr/local/bin
Installing explode.py script to /usr/local/bin
Installing thresholder.py script to /usr/local/bin
Installing player.py script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/Pillow-3.4.2-py2.7-linux-x86_64.egg

所以,我运行了以下命令:

cd /usr/local/bin
sudo rm -f pildriver.py viewer.py gifmaker.py painter.py pilfont.py pilprint.py pilconvert.py enhancer.py pilfile.py createfontdatachunk.py explode.py thresholder.py player.py
sudo rm -f /usr/local/lib/python2.7/dist-packages/Pillow-3.4.2-py2.7-linux-x86_64.egg

通过 apt-get 重新安装 Pillow (python-imaging) 后,一切正常。

关于python - 卸载从源代码构建的 PIL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17169435/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com