2013-06-18 27 views
2

我使用本教程來安裝PIL。現在,我想卸載它並在其位置安裝pillow卸載源自內部的PIL

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來處理所有的項目。

+0

如果你可以安裝[checkinstall](http://en.wikipedia.org/wiki/CheckInstall),你可以[可以用它來刪除PIL](http://stackoverflow.com/a/3544440/190597 )。 – unutbu

回答

2

從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 

重裝枕後(python-imaging)通過apt-get,一切運行良好。

0

您必須手動刪除所有已複製到系統中的文件。您還需要編輯一些文本文件並手動刪除對該文件的引用。

沒有卸載功能。下次使用您的發行包管理系統。

+0

謝謝。這是我唯一一次沒有使用自動化安裝系統(比如pip)。我必須這樣做。你能更具體地說我該怎麼做? – xpanta

+1

@xpanta你的linux發行版可能有一個軟件包管理系統,就像debian/ubuntu有dpkg/apt系統,而redhat/mandriva有rpm系統。如果您使用這些工具來安裝所需的軟件,則可以稍後使用相同的工具輕鬆地將其刪除。 – nosklo

+0

@nosklo,請提供關於哪些文本文件需要編輯的更多細節,以及我們應該尋找哪些文件以刪除? – Garrett