I have a PHP script which uses ImageMagick routines to manipulate images.
I am converting this script to Python-3.6 on Ubuntu_18.04.
I have tried "import ImageMagick" and lots of variations, all not found.
Then I discovered PythonMagick, also "not found"
so I downloaded http://www.imagemagick.org/download/pyt ... 19.tar.bz2 ,
unzipped it
cd /.../PythonMagick-0.9.19
./configure
which gives:
====
...
checking whether the Boost::Python library is available... no
checking for boostlib >= 1.20.0... configure: We could not detect the boost libraries (version 1.20 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
checking whether the Boost::Python library is available... (cached) no
checking for MAGICKCORE... no
configure: error: Package requirements (MagickCore >= 6.8.6) were not met:
No package 'MagickCore' found
====
Why are "core" components of the package not in the download?
Why are binaries of the newest (or any) library not in the Ubuntu repository or at least in ImageMagick's repository?
So I installed imagemagick-6.q16 (6.9.7) but ./configure still couldn't find MagickCore.
installing PythonMagick
-
- Posts: 7
- Joined: 2019-05-16T20:43:49-07:00
- Authentication code: 1152
-
- Posts: 7
- Joined: 2019-05-16T20:43:49-07:00
- Authentication code: 1152
Re: installing PythonMagick
This problem effectively makes ImageMagick unusable.
How can I tell WHAT CAN BE imported? Something like "import *list all".
How can I tell WHAT CAN BE imported? Something like "import *list all".
-
- Posts: 7
- Joined: 2019-05-16T20:43:49-07:00
- Authentication code: 1152
Re: installing PythonMagick
As you have probably guessed, I haven't a clue what I'm doing.
Where do I get MagickCore-6.8.6+ from, so I can build PythonMagick?
Or what should I install from the Ubuntu repositories?
I have Python-3.6.7 and my app starts:
The list of things I've tried is much longer than this.
Where do I get MagickCore-6.8.6+ from, so I can build PythonMagick?
Or what should I install from the Ubuntu repositories?
I have Python-3.6.7 and my app starts:
Code: Select all
#!/usr/bin/env python3
# Photo Editor
PhotoEditorVersion = "0.99"
# wx libs
import wx
import wx.grid
import wx.adv
import os
#import PythonMagick
#import pythonmagick
#import ImageMagick
#import MagickWand
#import pythonwand
#import *
#import all
#import isMagickWand
app = wx.App()
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: installing PythonMagick
Sorry, I do not use PythonMagick. But in the downloaded folder, there is a file called INSTALL. It has instructions for installing. Have you looked at it? There is also a README file.
-
- Posts: 7
- Joined: 2019-05-16T20:43:49-07:00
- Authentication code: 1152
Re: installing PythonMagick
Yes, I have read INSTALL and README, but I have no idea what the options mean or what I want. README says "Requists" for installation are boost, boost-python, python 2.5 and Magick++ 6.2+. I have tried to install these from the Ubuntu repositories, but boost and boost-python are not found, and libtool is already installed. Magick++ invokes a whole heap of things already installed and unmet dependencies:
I doubt I have any :i386 packages installed on my 64-bit machine, so I don't know what to do next.
Surely someone must have done this before: Ubuntu-18.04, Python-3.6.7, wxWidgets-4.0.1, amd64, PythonMagick.
Code: Select all
The following packages have unmet dependencies:
graphicsmagick-imagemagick-compat : Conflicts: imagemagick
Conflicts: imagemagick:i386
graphicsmagick-libmagick-dev-compat : Conflicts: libmagick++-dev
Conflicts: libmagickcore-dev but 8:6.9.7.4+dfsg-16ubuntu6.4 is to be installed
Conflicts: perlmagick
Conflicts: perlmagick:i386
Conflicts: libmagickcore-dev:i386
Conflicts: libmagick++-dev:i386
E: Unable to correct problems, you have held broken packages.
Surely someone must have done this before: Ubuntu-18.04, Python-3.6.7, wxWidgets-4.0.1, amd64, PythonMagick.
-
- Posts: 7
- Joined: 2019-05-16T20:43:49-07:00
- Authentication code: 1152
Re: installing PythonMagick
So I tried installing Anaconda for Linux and Python 3, since it suggested it had lots of libraries in with it (I'm desperate).
After a 654 MB (compressed) download (!), it installed OK.
I got given Python-3.7 as a bonus.
When I ran it with "anaconda-navigator" I got 3 warnings
"The conda.compat module is deprecated and will be removed in a future release."
"QApplication: invalid style override passed, ignoring it."
"/home/dk/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/conda_api.py:1364: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
data = yaml.load(f)"
it ran with a first-time dialog screen.
Un-checking the "do not show this again" box didn't work,
and the OK+something button didn't work, but the OK button did.
Obviously nobody tests their software any more, who cares?
It offers 8 "channels", none of them involved wxWidgets or ImageMagick.
I clicked on "Learning" in the left panel - nothing happened.
I clicked on "Community" in the left panel - nothing happened.
Abandoning Anaconda.
"sudo apt remove anaconda" - anaconda not found
"sudo apt remove anaconda3" - anaconda3 not found
I saw a file in my Downloads folder called ImageMagick-7.0.8-45.tar.bz2 only 2 days old.
so unzipped it, looked at INSTALL, cd to the directory, ./configure, make, sudo make install, all worked OK (Hurray!!!).
Good, I might try my script again, now:
$ ./wxpython/photoeditor/photoeditor.py
File "./wxpython/photoeditor/photoeditor.py", line 5, in <module>
import wx
ModuleNotFoundError: No module named 'wx'
WTF?
Eventually someone will take pity on me and help me out.
After a 654 MB (compressed) download (!), it installed OK.
I got given Python-3.7 as a bonus.
When I ran it with "anaconda-navigator" I got 3 warnings
"The conda.compat module is deprecated and will be removed in a future release."
"QApplication: invalid style override passed, ignoring it."
"/home/dk/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/conda_api.py:1364: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
data = yaml.load(f)"
it ran with a first-time dialog screen.
Un-checking the "do not show this again" box didn't work,
and the OK+something button didn't work, but the OK button did.
Obviously nobody tests their software any more, who cares?
It offers 8 "channels", none of them involved wxWidgets or ImageMagick.
I clicked on "Learning" in the left panel - nothing happened.
I clicked on "Community" in the left panel - nothing happened.
Abandoning Anaconda.
"sudo apt remove anaconda" - anaconda not found
"sudo apt remove anaconda3" - anaconda3 not found
I saw a file in my Downloads folder called ImageMagick-7.0.8-45.tar.bz2 only 2 days old.
so unzipped it, looked at INSTALL, cd to the directory, ./configure, make, sudo make install, all worked OK (Hurray!!!).
Good, I might try my script again, now:
$ ./wxpython/photoeditor/photoeditor.py
File "./wxpython/photoeditor/photoeditor.py", line 5, in <module>
import wx
ModuleNotFoundError: No module named 'wx'
WTF?
Eventually someone will take pity on me and help me out.
-
- Posts: 7
- Joined: 2019-05-16T20:43:49-07:00
- Authentication code: 1152
Re: installing PythonMagick
I see from others questions being asked that even though you have downloaded 11 MB of src code, you still don't have routines to process .jpg files, or .png files.
What is the use of an image-processing "package" that can't open .jpg and .png, (or anything else)?
What is the use of an image-processing "package" that can't open .jpg and .png, (or anything else)?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: installing PythonMagick
When you install from binary, Imagemagick comes with most if not all delegate libraries installed. But when you install from source, there is not way to include the delegate libraries. So you have to install them separately before you install Imagemagick. Sorry, I cannot help with Linux installs. I use a Mac and get my delegates from MacPorts.
For delegates, see https://imagemagick.org/download/delegates/
For delegates, see https://imagemagick.org/download/delegates/
-
- Posts: 7
- Joined: 2019-05-16T20:43:49-07:00
- Authentication code: 1152
Re: installing PythonMagick
Thanks. I accept that that is the way it is, but the way it is IS STUPID.
I am sick and tired of all this stupidity. The sensible thing is to say "Don't use ImageMagick/PythonMagick".
Abandoning this project in disgust after 5 days of going round in circles and getting no help.
I am sick and tired of all this stupidity. The sensible thing is to say "Don't use ImageMagick/PythonMagick".
Abandoning this project in disgust after 5 days of going round in circles and getting no help.