简体   繁体   English

找不到setup.py文件来安装PIL

[英]Can't locate setup.py file to install PIL

I am following the instructions on the following page, and I am not sure which setup.py file it is referring to where I need to change JPEG_ROOT = libinclude(“/usr/local”) (I am a beginner). 我正在按照下一页上的说明进行操作,并且不确定要在哪个setup.py文件中更改JPEG_ROOT = libinclude(“/usr/local”) (我是初学者)。 Mac OS X, Python 2.7. Mac OS X,Python 2.7。

Here is the link , and below is an abstract: 这是链接 ,下面是摘要:

Next get PIL and untar it 接下来获取PIL并将其解压缩

http://effbot.org/downloads/Imaging-1.1.6.tar.gz tar -zxvf Imaging-1.1.6.tar.gz cd Imaging-1.1.6 http://effbot.org/downloads/Imaging-1.1.6.tar.gz tar -zxvf Imaging-1.1.6.tar.gz cd Imaging-1.1.6

If you already have PIL I would recommend running 如果您已经有PIL,建议您运行

sudo rm -Rf build sudo rm -Rf构建

to clean any existing builds, this has caused me loads of errors and gray hairs! 清理任何现有的内部版本,这给我带来了很多错误和灰白的头发!

in your setup.py file run find JPEG_ROOT 在您的setup.py文件中运行,找到JPEG_ROOT

amend it so it looks as follows 对其进行修改,如下所示

JPEG_ROOT = libinclude(“/usr/local”) JPEG_ROOT = libinclude(“ / usr / local”)

Next move onto the build 下一步进入构建

sudo python setup.py build sudo python setup.py构建

Any help much appreciated. 任何帮助,不胜感激。

解压缩归档文件时,位于Imaging-1.1.6的根目录是setup.py。

它是指提取文件根目录中的setup.py

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM