Python安裝Imaging報錯:The _imaging C module is not installed問題解決方法
更新時間:2014年08月22日 09:45:31 投稿:junjie
這篇文章主要介紹了Python安裝Imaging報錯:The _imaging C module is not installed問題解決方法,原來是PIL庫的庫文件沒有加到系統(tǒng)中導致老是提示這個錯誤,需要的朋友可以參考下
今天寫Python程序上傳圖片需要用到PIL庫,于是到http://www.pythonware.com/products/pil/#pil117下載了一個1.1.7版本的,我用的是CentOS64 并且自行升級后的Python版本安裝PIL庫
首先下載解壓:
復制代碼 代碼如下:
[root@lee ~]# wget http://www.pythonware.com/products/pil/#pil117
[root@lee ~]# tar -xf Imaging-1.1.7.tar.gz
然后準備安裝
復制代碼 代碼如下:
[root@lee ~]# cd Imaging-1.1.7
[root@lee Imaging-1.1.7]# python python setup.py build_ext -i
都沒問題,當測試安裝的時候卻老提示:*** The _imaging C module is not installed
復制代碼 代碼如下:
[root@lee Imaging-1.1.7]# python selftest.py
*** The _imaging C module is not installed
找了半天,也找不出是什么原因,后來終于在官網(wǎng)從一堆英文中找到了關鍵所在,解決方法,實際根據(jù)自己的python PIL路徑設置
復制代碼 代碼如下:
[root@lee Imaging-1.1.7]# echo '/usr/local/lib/python2.7/site-packages/PIL' >> /etc/ld.so.conf
[root@lee Imaging-1.1.7]# ldconfig
重新python selftest.py,一路安裝完成
相關文章
解決pip安裝tensorflow中出現(xiàn)的no module named tensorflow.python 問題方法
這篇文章主要介紹了解決pip安裝tensorflow中出現(xiàn)的no module named tensorflow.python 問題方法,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2021-02-02
使用Python爬蟲庫requests發(fā)送表單數(shù)據(jù)和JSON數(shù)據(jù)
今天再為大家介紹下使用Python爬蟲庫requests發(fā)送表單數(shù)據(jù)和JSON數(shù)據(jù)的方法,這是最基本的使用方法,大家可以參考測試下2020-01-01

