11

我试图在 CentOS 上安装 pgmagick。

运行后pip install pgmagick我得到一些错误。在我检查了日志文件后,这就是我得到的:

  Running setup.py egg_info for package pgmagick
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/root/build/pgmagick/setup.py", line 74, in <module>
        raise Exception("Magick++ not found")
    Exception: Magick++ not found
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "/root/build/pgmagick/setup.py", line 74, in <module>
    raise Exception("Magick++ not found")
Exception: Magick++ not found
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /root/build/pgmagick
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/usr/lib/python2.6/site-packages/pip/commands/install.py", line 245, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.6/site-packages/pip/req.py", line 1009, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/lib/python2.6/site-packages/pip/req.py", line 225, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python2.6/site-packages/pip/__init__.py", line 256, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /root/build/pgmagick

我错过了什么吗?如何让它发挥作用?

4

4 回答 4

38

我自己刚吃过这个。对于将来通过 Google 访问的任何人,您首先需要两个额外的包:

sudo apt-get install libgraphicsmagick++1-dev libboost-python-dev
于 2013-03-26T15:27:39.027 回答
4

您可能缺少该GraphicsMagick-c++-devel软件包(可从EPEL存储库获得)。

于 2013-07-21T22:54:25.640 回答
0

对于 Arch 基础发行版,您需要执行以下操作:

sudo pacman -S libmagick boost graphicsmagick imagemagick
于 2018-03-19T01:42:01.310 回答
0

通过注意官方安装指导

pgmagick 在类 UNIX 系统上可用。并依赖于以下库。

对于Debian

$ sudo apt-get install libboost-python-dev libgraphicsmagick++1-dev

如果您有其他操作系统,您可以查看安装页面

之后,您可以使用 pip 安装 pgmagic

$ pip install pgmagick
于 2020-06-28T10:24:13.180 回答