At this point, you have the system Python 2.7 available, potentially the Homebrew version of Python 2 installed, and the Homebrew version of Python 3 as well. $ python will launch the Homebrew-installed Python 3 interpreter. I activated my Python 3 installation and installed OpenCV 3 with Python 3 support like this: pyenv shell 3.5.0 brew install opencv3 -with-python3 But when I launch an IPython shell and import cv2, I get an error.
Wand itself can be installed from PyPI using easy_install orpip:
Wand is a Python binding of ImageMagick, so you have to install it as well:
Or you can simply install Wand and its entire dependencies using the packagemanager of your system (it’s way convenient but the version might be outdated):
Install ImageMagick on Debian/Ubuntu¶
If you’re using Linux distributions based on Debian like Ubuntu, it can beeasily installed using APT:
Install ImageMagick on Fedora/CentOS¶
If you’re using Linux distributions based on Redhat like Fedora or CentOS,it can be installed using Yum:
Install ImageMagick on Mac¶
You need one of Homebrew or MacPorts to install ImageMagick.
If your Python in not installed using MacPorts, you have to exportMAGICK_HOME path as well. Because Python that is not installedusing MacPorts doesn’t look up /opt/local, the default path prefixof MacPorts packages.
Install ImageMagick on Windows¶
You could build ImageMagick by yourself, but it requires a build tool chainlike Visual Studio to compile it. The easiest way is simply downloadinga prebuilt binary of ImageMagick for your architecture (win32 orwin64).
You can download it from the following link:
Choose a binary for your architecture:
- Windows 32-bit
- Windows 64-bit
Note that you have to check Install development headers andlibraries for C and C++ to make Wand able to link to it.
Lastly you have to set MAGICK_HOME environment variable to the pathof ImageMagick (e.g. C:ProgramFilesImageMagick-6.7.7-Q16).You can set it in Computer ‣ Properties ‣Advanced system settings ‣ Advanced ‣ Environment Variables....
Brew Install Python 3.5 Windows 10
Install Wand on Debian/Ubuntu¶
Wand itself is already packaged in Debian/Ubuntu APT repository: python-wand.You can install it using apt-get command:
Brew Install Python 3.5
Install Wand on FreeBSD¶
Brew Install Python 3.5 Online
Wand itself is already packaged in FreeBSD ports collection: py-wand.You can install it using pkg_add command: