卸载从源代码构建的PIL [英] Uninstalling PIL built from source
问题描述
我使用了本教程来安装PIL.现在,我要卸载它并在其位置安装pillow
.
I used this tutorial to install PIL. Now, I want to uninstall it and install pillow
in its place.
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:我没有在任何virtualenv中安装PIL.这是一个全局安装.但是,我在所有项目中都使用了virtualenvs.
PS: I haven't installed PIL in any of my virtualenvs. It is a global installation. I am using virtualenvs to all my projects, however.
推荐答案
从Ubuntu 14.04开始工作,但这通常应该适用.安装后,我致电了以下内容:
Working from Ubuntu 14.04, but this should be generally applicable. When I installed, I called the following:
sudo python setup.py install
我注意到以下描述默认安装的语句:
I noted the following statements describing the default installation:
...
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
因此,我运行了以下内容:
So, I ran the following:
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)后,一切运行正常.
After reinstalling Pillow (python-imaging) through apt-get, everything's running fine.
这篇关于卸载从源代码构建的PIL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!