相关疑难解决方法(0)

Python图像库失败,消息"解码器JPEG不可用" - PIL

PIL在我的系统中支持JPEG.

每当我上传时,我的代码都失败了:

File "PIL/Image.py", line 375, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

python jpeg python-imaging-library pillow

304
推荐指数
9
解决办法
15万
查看次数

Xcode目前无法从软件更新服务器获得

更新到OS X 10.9后,我的macport出现问题.

我尝试按照本手册https://trac.macports.org/wiki/Migration修复它们.

但是当我安装命令行工具时:

xcode-select --install

我得到消息

无法安装软件,因为软件更新服务器当前无法使用该软件.

同时我成功将我的其他机器更新为OS X 10.9.和安装的命令行工具没有问题,所以它们必须可用.

这里有什么问题?

macos xcode macports osx-mavericks

140
推荐指数
9
解决办法
8万
查看次数

在Mac OS X 10.9上使用pip安装Python Image Library时出错

我想使用pip在Mavericks上安装PIL,但是会出现此错误.

_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found
#include <freetype/fterrors.h>
         ^
1 error generated.
error: command 'cc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

我的命令行工具已安装并且是最新的,我发现的每个提示都没有帮助.我该如何编译?

编辑:我刚刚检查过,freetype也已经通过自制软件安装了

python macos pip

78
推荐指数
4
解决办法
3万
查看次数

如何在mac os x 10.7.2 Lion上安装PIL

我试过谷歌搜索和查找其他人的问题.但是,我仍然找不到在mac os x 10.7.2 Lion上安装PIL(for python 2.6或2.7)的清晰/简单配方.

python macos python-imaging-library

40
推荐指数
4
解决办法
7万
查看次数

xcrun/lipo与OS X Mavericks和XCode 4.x冻结

一直试图用easy_install或pip安装psycopg2,终端卡在xcrun和lipo之间的循环中.

sidwyn$ sudo easy_install psycopg2
Searching for psycopg2
Reading https://pypi.python.org/simple/psycopg2/
Reading http://initd.org/psycopg/
Reading http://initd.org/projects/psycopg2
Best match: psycopg2 2.5.1
Downloading https://pypi.python.org/packages/source/p/psycopg2/psycopg2-2.5.1.tar.gz#md5=1b433f83d50d1bc61e09026e906d84c7
Processing psycopg2-2.5.1.tar.gz
Writing /tmp/easy_install-dTk7cd/psycopg2-2.5.1/setup.cfg
Running psycopg2-2.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dTk7cd/psycopg2-2.5.1/egg-dist-tmp-4jaXas
clang: warning: argument unused during compilation: '-mno-fused-madd'
Run Code Online (Sandbox Code Playgroud)

它在xcrun和lipo之间反弹,并永远停留在这个循环中.希望对此有一些见解.

我是OS X Mavericks 10.9,最新版本.

python xcode psycopg2 lipo osx-mavericks

26
推荐指数
2
解决办法
7057
查看次数

在小牛上安装Pillow/PIL

我尝试使用pip/easy_install安装Pillow时遇到一个奇怪的错误:

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.5.3/include/freetype2 -I/private/var/folders/c_/r7sp373509jdb6_1xmmzvl9c0000gn/T/pip_build_tills13/Pillow/libImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1 …
Run Code Online (Sandbox Code Playgroud)

python pip easy-install python-imaging-library pillow

18
推荐指数
4
解决办法
8834
查看次数

无法使用自制软件python在OSX 10.10上安装任何需要C编译的东西

当我尝试pip install涉及C编译的事情(Pillow特别是)时,我得到一个奇怪的错误:

clang: error: no such file or directory: 'Python.framework/Versions/2.7/Python'

error: command 'clang' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/xt/f2d8vp4j65j2rt71pns6trjw0000gn/T/pip_build_jakob/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xt/f2d8vp4j65j2rt71pns6trjw0000gn/T/pip-LnL0hW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/xt/f2d8vp4j65j2rt71pns6trjw0000gn/T/pip_build_jakob/Pillow
Run Code Online (Sandbox Code Playgroud)

我发布了我pip.log的安装.

我认为这个问题是由于OSX 10.10 Yosemite和Homebrew python的结合.你以前经历过这个吗?关于如何解决它的想法?

python macos pip osx-yosemite

5
推荐指数
1
解决办法
619
查看次数

使用pip在Mac 10.9.1上安装Scrapy错误

我正在尝试在mac os 10.9.1上安装scrapy

sudo pip install scrapy

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/include/libxml2 -I/private/var/folders/k6/g5dx4fj91tdf6f4_28p6fh980000gn/T/pip_build_tommy/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace

xcrun: error: active developer path ("/Developer") does not exist, use xcode-select to change

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/k6/g5dx4fj91tdf6f4_28p6fh980000gn/T/pip_build_tommy/lxml/setup.py';exec(compile(getattr(tokenize, 'open', …
Run Code Online (Sandbox Code Playgroud)

python macos scrapy

1
推荐指数
1
解决办法
1955
查看次数