Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Python: GEEZUS! pythonmagickwand issues, help?
New Posts  All Forums:Forum Nav:

Python: GEEZUS! pythonmagickwand issues, help?

post #1 of 6
Thread Starter 
Code:

#!/usr/bin/env python

from pythonmagickwand.image import Image

def convert(filename=None):
     im = Image(filename+'.gif')
     im.format = 'JPEG'
     im.save(filename+'.jpg') 
Code:
Traceback (most recent call last):
  File "./convert.py", line 3, in <module>
    from pythonmagickwand.image import Image
  File "/usr/local/lib/python2.6/dist-packages/PythonMagickWand-0.1-py2.6.egg/pythonmagickwand/image.py", line 2, in <module>
    from pythonmagickwand import api, wand, color
  File "/usr/local/lib/python2.6/dist-packages/PythonMagickWand-0.1-py2.6.egg/pythonmagickwand/api.py", line 21, in <module>
    raise ImportError('Cannot find ImageMagick MagickWand library.')
ImportError: Cannot find ImageMagick MagickWand library.
THIS IS DRIVING ME NUTS! Should be a simple conversion, this is the third library I've tried.
PIL didn't like my .gifs
OIIO doesn't work with gifs at all...
and pythonmagick can't convert them.

I've got all the PythonMagick Libraries installed, and ImageMagick libraries as well... but still I can't figure this out. Any ideas/suggestions are appreciated.

PS: Documentation on all these libraries is sparse, and lacking...

seems the issue is inside of the /usr/local/lib/python2.6/dist-packages/PythonMagickWand-0.1-py2.6.egg/pythonmagickwand/api.py

Code:

def find_wand(path):
    try:
        return find_library(path)
    except:
        pass

# Mac OS user may have installed ImageMagick via Fink
wand_lib = None
for path in ['Wand', '/usr/lib/libWand', '/usr/lib/libMagickWand.so', '/sw/lib/libWand', '/opt/lib/libWand']:
    wand_lib = find_library(path)
    if wand_lib:
        break

if not wand_lib:
    raise ImportError('Cannot find ImageMagick MagickWand library.') 

Edited by H3||scr3am - 2/10/11 at 1:31am
SR2 PWNS J00
(22 items)
 
SL4V3
(16 items)
 
 
CPUMotherboardGraphicsRAM
2x intel Xeon X5650 @ 4Ghz Evga SR-2 SLi Evga GTX480s 18GB G.SKill Pi 1600 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
60GB Vertex 3 2TB Western Digital Black 2TB External HDD (USB 2) 22x Sata Bluray/DVD Multi Drive 
CoolingCoolingCoolingCooling
Hardware Labs GTX 360 Radiator EK Supreme HF Copper Danger Den GTX480 Waterblock All Copper Natemandoo SR-2 Solid Copper Waterblock 
CoolingCoolingOSMonitor
Iwaki RD-30 D5 with DCThermo Top Windows 7 Ultimate 3x 24" LG LCDs (16:9) 
KeyboardPowerCaseMouse
Ducky Shine MX-Cherry Black Mechanical Keyboard... 1500W Silver stone Strider Mountain Mods Extended Ascension Horizon Razer Mamba 2012 (wired) 
Mouse PadAudio
Razer XactMat Asus Xonar SXT 
CPUMotherboardGraphicsRAM
intel Q6600 ASUS P5K-E Wifi AMD HD Radeon 6990 4GBs G.skill HZs 
Hard DriveOptical DriveCoolingOS
OCZ vertex 2 LG 22x combo drive Cooler Master hyper 212+ Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
LG FLATRON L1933TR LG FLATRON L1933TR Logitech G15 rev. 1 Silverstone Decathlon 750W modular PSU 
CaseMouseMouse PadAudio
Thermaltake Armor with 250mm side fan Logitech 2000dpi USB mouse Steel series QcK+ Auzentech X-Fi prelude 
  hide details  
Reply
SR2 PWNS J00
(22 items)
 
SL4V3
(16 items)
 
 
CPUMotherboardGraphicsRAM
2x intel Xeon X5650 @ 4Ghz Evga SR-2 SLi Evga GTX480s 18GB G.SKill Pi 1600 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
60GB Vertex 3 2TB Western Digital Black 2TB External HDD (USB 2) 22x Sata Bluray/DVD Multi Drive 
CoolingCoolingCoolingCooling
Hardware Labs GTX 360 Radiator EK Supreme HF Copper Danger Den GTX480 Waterblock All Copper Natemandoo SR-2 Solid Copper Waterblock 
CoolingCoolingOSMonitor
Iwaki RD-30 D5 with DCThermo Top Windows 7 Ultimate 3x 24" LG LCDs (16:9) 
KeyboardPowerCaseMouse
Ducky Shine MX-Cherry Black Mechanical Keyboard... 1500W Silver stone Strider Mountain Mods Extended Ascension Horizon Razer Mamba 2012 (wired) 
Mouse PadAudio
Razer XactMat Asus Xonar SXT 
CPUMotherboardGraphicsRAM
intel Q6600 ASUS P5K-E Wifi AMD HD Radeon 6990 4GBs G.skill HZs 
Hard DriveOptical DriveCoolingOS
OCZ vertex 2 LG 22x combo drive Cooler Master hyper 212+ Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
LG FLATRON L1933TR LG FLATRON L1933TR Logitech G15 rev. 1 Silverstone Decathlon 750W modular PSU 
CaseMouseMouse PadAudio
Thermaltake Armor with 250mm side fan Logitech 2000dpi USB mouse Steel series QcK+ Auzentech X-Fi prelude 
  hide details  
Reply
post #2 of 6
What OS is this?
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #3 of 6
Thread Starter 
linux Ubuntu 10.10 x64
SR2 PWNS J00
(22 items)
 
SL4V3
(16 items)
 
 
CPUMotherboardGraphicsRAM
2x intel Xeon X5650 @ 4Ghz Evga SR-2 SLi Evga GTX480s 18GB G.SKill Pi 1600 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
60GB Vertex 3 2TB Western Digital Black 2TB External HDD (USB 2) 22x Sata Bluray/DVD Multi Drive 
CoolingCoolingCoolingCooling
Hardware Labs GTX 360 Radiator EK Supreme HF Copper Danger Den GTX480 Waterblock All Copper Natemandoo SR-2 Solid Copper Waterblock 
CoolingCoolingOSMonitor
Iwaki RD-30 D5 with DCThermo Top Windows 7 Ultimate 3x 24" LG LCDs (16:9) 
KeyboardPowerCaseMouse
Ducky Shine MX-Cherry Black Mechanical Keyboard... 1500W Silver stone Strider Mountain Mods Extended Ascension Horizon Razer Mamba 2012 (wired) 
Mouse PadAudio
Razer XactMat Asus Xonar SXT 
CPUMotherboardGraphicsRAM
intel Q6600 ASUS P5K-E Wifi AMD HD Radeon 6990 4GBs G.skill HZs 
Hard DriveOptical DriveCoolingOS
OCZ vertex 2 LG 22x combo drive Cooler Master hyper 212+ Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
LG FLATRON L1933TR LG FLATRON L1933TR Logitech G15 rev. 1 Silverstone Decathlon 750W modular PSU 
CaseMouseMouse PadAudio
Thermaltake Armor with 250mm side fan Logitech 2000dpi USB mouse Steel series QcK+ Auzentech X-Fi prelude 
  hide details  
Reply
SR2 PWNS J00
(22 items)
 
SL4V3
(16 items)
 
 
CPUMotherboardGraphicsRAM
2x intel Xeon X5650 @ 4Ghz Evga SR-2 SLi Evga GTX480s 18GB G.SKill Pi 1600 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
60GB Vertex 3 2TB Western Digital Black 2TB External HDD (USB 2) 22x Sata Bluray/DVD Multi Drive 
CoolingCoolingCoolingCooling
Hardware Labs GTX 360 Radiator EK Supreme HF Copper Danger Den GTX480 Waterblock All Copper Natemandoo SR-2 Solid Copper Waterblock 
CoolingCoolingOSMonitor
Iwaki RD-30 D5 with DCThermo Top Windows 7 Ultimate 3x 24" LG LCDs (16:9) 
KeyboardPowerCaseMouse
Ducky Shine MX-Cherry Black Mechanical Keyboard... 1500W Silver stone Strider Mountain Mods Extended Ascension Horizon Razer Mamba 2012 (wired) 
Mouse PadAudio
Razer XactMat Asus Xonar SXT 
CPUMotherboardGraphicsRAM
intel Q6600 ASUS P5K-E Wifi AMD HD Radeon 6990 4GBs G.skill HZs 
Hard DriveOptical DriveCoolingOS
OCZ vertex 2 LG 22x combo drive Cooler Master hyper 212+ Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
LG FLATRON L1933TR LG FLATRON L1933TR Logitech G15 rev. 1 Silverstone Decathlon 750W modular PSU 
CaseMouseMouse PadAudio
Thermaltake Armor with 250mm side fan Logitech 2000dpi USB mouse Steel series QcK+ Auzentech X-Fi prelude 
  hide details  
Reply
post #4 of 6
Quote:
Originally Posted by H3||scr3am View Post
linux Ubuntu 10.10 x64
Make sure you have libmagickwand3 installed.

Code:
sudo apt-get install libmagickwand3
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
Underground
(14 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 C0 ASUS P6T6 WS Revolution GTX 460 TR3X6G1600C8D 
Hard DriveOptical DriveCoolingOS
WD1001FALS SAMSUNG SH-S223F 22X DVD MULTI Corsair H50 Fedora 16 KDE x86_64 
MonitorKeyboardPowerCase
HP w19b Microsoft Comfort Curve Corsair CX600 Thermaltake Armor VA8003BWS 
MouseMouse Pad
Razer DeathAdder Black 
  hide details  
Reply
post #5 of 6
Thread Starter 
I did, I solved it by making my own Ctypes wrapper for it, and got what I needed done
SR2 PWNS J00
(22 items)
 
SL4V3
(16 items)
 
 
CPUMotherboardGraphicsRAM
2x intel Xeon X5650 @ 4Ghz Evga SR-2 SLi Evga GTX480s 18GB G.SKill Pi 1600 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
60GB Vertex 3 2TB Western Digital Black 2TB External HDD (USB 2) 22x Sata Bluray/DVD Multi Drive 
CoolingCoolingCoolingCooling
Hardware Labs GTX 360 Radiator EK Supreme HF Copper Danger Den GTX480 Waterblock All Copper Natemandoo SR-2 Solid Copper Waterblock 
CoolingCoolingOSMonitor
Iwaki RD-30 D5 with DCThermo Top Windows 7 Ultimate 3x 24" LG LCDs (16:9) 
KeyboardPowerCaseMouse
Ducky Shine MX-Cherry Black Mechanical Keyboard... 1500W Silver stone Strider Mountain Mods Extended Ascension Horizon Razer Mamba 2012 (wired) 
Mouse PadAudio
Razer XactMat Asus Xonar SXT 
CPUMotherboardGraphicsRAM
intel Q6600 ASUS P5K-E Wifi AMD HD Radeon 6990 4GBs G.skill HZs 
Hard DriveOptical DriveCoolingOS
OCZ vertex 2 LG 22x combo drive Cooler Master hyper 212+ Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
LG FLATRON L1933TR LG FLATRON L1933TR Logitech G15 rev. 1 Silverstone Decathlon 750W modular PSU 
CaseMouseMouse PadAudio
Thermaltake Armor with 250mm side fan Logitech 2000dpi USB mouse Steel series QcK+ Auzentech X-Fi prelude 
  hide details  
Reply
SR2 PWNS J00
(22 items)
 
SL4V3
(16 items)
 
 
CPUMotherboardGraphicsRAM
2x intel Xeon X5650 @ 4Ghz Evga SR-2 SLi Evga GTX480s 18GB G.SKill Pi 1600 DDR3 
Hard DriveHard DriveHard DriveOptical Drive
60GB Vertex 3 2TB Western Digital Black 2TB External HDD (USB 2) 22x Sata Bluray/DVD Multi Drive 
CoolingCoolingCoolingCooling
Hardware Labs GTX 360 Radiator EK Supreme HF Copper Danger Den GTX480 Waterblock All Copper Natemandoo SR-2 Solid Copper Waterblock 
CoolingCoolingOSMonitor
Iwaki RD-30 D5 with DCThermo Top Windows 7 Ultimate 3x 24" LG LCDs (16:9) 
KeyboardPowerCaseMouse
Ducky Shine MX-Cherry Black Mechanical Keyboard... 1500W Silver stone Strider Mountain Mods Extended Ascension Horizon Razer Mamba 2012 (wired) 
Mouse PadAudio
Razer XactMat Asus Xonar SXT 
CPUMotherboardGraphicsRAM
intel Q6600 ASUS P5K-E Wifi AMD HD Radeon 6990 4GBs G.skill HZs 
Hard DriveOptical DriveCoolingOS
OCZ vertex 2 LG 22x combo drive Cooler Master hyper 212+ Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
LG FLATRON L1933TR LG FLATRON L1933TR Logitech G15 rev. 1 Silverstone Decathlon 750W modular PSU 
CaseMouseMouse PadAudio
Thermaltake Armor with 250mm side fan Logitech 2000dpi USB mouse Steel series QcK+ Auzentech X-Fi prelude 
  hide details  
Reply
post #6 of 6
Very interresting.
I have the same problem
Can you share your Ctypes modification ?
Thanks in advance
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Python: GEEZUS! pythonmagickwand issues, help?