小编ken*_*nok的帖子

Django/PIL错误 - 渲染时捕获异常:未安装_imagingft C模块

我正在尝试在我的机器上运行webapp/site,它在OSX 10.6.2上运行,我遇到了一些问题:

Caught an exeption while rending: The _imagingft C module is not installed
Run Code Online (Sandbox Code Playgroud)

在python中执行import _imagingft给了我:

>>> import _imagingft
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.6/site-packages/PIL/_imagingft.so,
2): Symbol not found: _FT_Done_Face
 Referenced from: /Library/Python/2.6/site-packages/PIL/_imagingft.so
 Expected in: flat namespace
 in /Library/Python/2.6/site-packages/PIL/_imagingft.so
Run Code Online (Sandbox Code Playgroud)

似乎Freetype库是有问题的库.到目前为止,安装PIL或编译(?)jpeg和freetype库到目前为止没有错误.

我在django 1.1.1,python 2.6.2上.

python django macos python-imaging-library

7
推荐指数
2
解决办法
4462
查看次数

当我创建virtualenv时,即使已经在OSX中设置为32位,python也会以64位运行

我的设置是:2.6.1 python(苹果默认,雪豹),virtualenv,并使用virtualenvwrapper

在环境之外,一切都以32位运行,这很好.但是有了一个新项目,我将继续研究需要django 1.3和大量的依赖项,所以我做了一个virtualenv.

我已经设法安装好一切,除了mysql-python(通过pip)得到"mach -o错误架构"的错误.我用virtualenv中的"import sys; sys.maxint"检查了我的python解释器,python以64位运行.

我已经设置了systemwide for python以32位运行"defaults write com.apple.versioner.python Prefer-32-Bit -bool yes"

有谁知道为什么在virtualenv内发生这种情况?

python macos virtualenv mysql-python 32bit-64bit

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