【问题标题】:PIL installation error in HerokuHeroku中的PIL安装错误
【发布时间】:2014-09-03 15:20:09
【问题描述】:

我很想将 PIL 安装到 Heroku,因为 Django-Avatar 似乎需要它。

所以我把它放在了我的 requirements.txt 中,但是安装时它给了我以下错误:

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' 在制作共享对象时不能使用;用 -fPIC 重新编译

   /usr/local/lib/libpython2.7.a: could not read symbols: Bad value

   collect2: ld returned 1 exit status

   error: command 'gcc' failed with exit status 1

我不知道如何解决这个问题。

我已经做了一些研究,看起来其他软件包也遇到了同样的错误,例如 reportlab,正在诊断这种情况:

问题似乎是由于 /usr/local/lib/libpython2.7.a 中存在静态 Python 2.7 库引起的

然后发布了更新版本的 reportlab 以绕过崩溃。 PIL 的情况并非如此,有人可以指出我该怎么做吗?

谢谢

【问题讨论】:

  • 你尝试在 heroku bash 中安装 PIL ..?
  • PIL 在这一点上几乎是废弃软件。请改用Pillow
  • Pillow 2.2.1 也是如此,请回答问题。

标签: python django heroku python-imaging-library


【解决方案1】:

在你的requirements.txt 使用这个 PIL 分叉:

wsgiref==0.1.2
-e hg+https://bitbucket.org/etienned/pil-2009-raclette/#egg=PIL
pyyaml

它解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-13
    • 1970-01-01
    • 2012-12-30
    相关资源
    最近更新 更多