If you're looking for Python (2.7) bindings (as this question's tag suggests), I requested them in the past via this bug report. A couple of people apparently managed to produce something, but I haven't checked those out yet. If you installed Python from source, with an installer from python.org, or via Homebrew you should already have pip. If you’re on Linux and installed using your OS package manager, you may have to install pip separately.
- Install Python Via Homebrew Switch
- Install Python Via Homebrew Emulator
- Install Python Via Homebrew
- Install Python 3.8 Using Homebrew
- Install Python Via Homebrew
Released:
Yet Another Python wrapper for GraphicsMagick
Project description
About
pgmagick is a yet another boost.python based wrapper for GraphicsMagick.
Requirements
Python3.5++ (or Python2.7), GraphicsMagick and Boost.Python.
package install on Ubuntu(test on Ubuntu10.04+):
package install on Fedora:
GraphicsMagick from source package:
MacOSX
via homebrew-cask(homebrew-pgmagick) with Python3
use homebrew-pgmagick
via homebrew-cask(homebrew-pgmagick) with Python3
via homebrew and pip with Python3
on MacOSX (10.13.5~10.15.x):
Windows
Now, not official support.However, unofficial binary packages exists.
ImageMagick support
pgmagick is supported to ImageMagick library. (version:0.4+)
package install on Ubuntu(test on Ubuntu10.04+):
show library name and version:
Usage
scale example:
resize example:
composite example:
draw example:
blob access:
create animated-GIF:
more API detail… read to Magick++ API for GraphicsMagick document.
Python APIs(NOTICE!! this api is alpha version!!):
Project details
Release historyRelease notifications | RSS feed
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6
0.5.12
0.5.11
0.5.10
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5
0.4.2
0.4.1
0.4
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.2
0.1.1
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size pgmagick-0.7.5.tar.gz (363.5 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for pgmagick-0.7.5.tar.gz
Algorithm | Hash digest |
---|---|
SHA256 | f676e2e4abd5d27cfb3bf1e7a1d8df147683f4a753333470aa771137ce05c347 |
MD5 | 6e0d5bd7816640867f7a038538af1fff |
BLAKE2-256 | e4297fb208efd5e2e7b107c68dca0a0781a669372a6518c7687cd6fc5f8540b5 |
This tutorial walks you through installing and using Python packages.
It will show you how to install and use the necessary tools and make strongrecommendations on best practices. Keep in mind that Python is used for a greatmany different purposes, and precisely how you want to manage your dependenciesmay change based on how you decide to publish your software. The guidancepresented here is most directly applicable to the development and deployment ofnetwork services (including web applications), but is also very well suited tomanaging development and testing environments for any kind of project.
Note
This guide is written for Python 3, however, these instructionsshould work fine on Python 2.7—if you are still using it, for some reason.
Make sure you’ve got Python & pip¶
Before you go any further, make sure you have Python and that it’s availablefrom your command line. You can check this by simply running:
You should get some output like 3.6.2
. If you do not have Python, pleaseinstall the latest 3.x version from python.org or refer to theInstalling Python section of this guide.
Note
If you’re newcomer and you get an error like this:
It’s because this command is intended to be run in a shell (also calleda terminal or console). See the Python for Beginnersgetting started tutorial for an introduction to using your operatingsystem’s shell and interacting with Python.
Additionally, you’ll need to make sure you have pip available. You cancheck this by running:
If you installed Python from source, with an installer from python.org, orvia Homebrew you should already have pip. If you’re on Linux and installedusing your OS package manager, you may have to install pip separately.
Installing Pipenv¶
Pipenv is a dependency manager for Python projects. If you’re familiarwith Node.js’ npm or Ruby’s bundler, it is similar in spirit to thosetools. While pip can install Python packages, Pipenv is recommended asit’s a higher-level tool that simplifies dependency management for common usecases.
Use pip
to install Pipenv:
Note
This does a user installation to prevent breaking any system-widepackages. If pipenv
isn’t available in your shell after installation,you’ll need to add the user base’s binary directory to your PATH
.
On Linux and macOS you can find the user base binary directory by runningpython-msite--user-base
and adding bin
to the end. For example,this will typically print ~/.local
(with ~
expanded to theabsolute path to your home directory) so you’ll need to add~/.local/bin
to your PATH
. You can set your PATH
permanently bymodifying ~/.profile.
Install Python Via Homebrew Switch
On Windows you can find the user base binary directory by runningpy-msite--user-site
and replacing site-packages
withScripts
. For example, this could returnC:UsersUsernameAppDataRoamingPython36site-packages
so you wouldneed to set your PATH
to includeC:UsersUsernameAppDataRoamingPython36Scripts
. You can set youruser PATH
permanently in the Control Panel. You may need to logout for the PATH
changes to take effect.
Installing packages for your project¶
Install Python Via Homebrew Emulator
Pipenv manages dependencies on a per-project basis. To install packages,change into your project’s directory (or just an empty directory for thistutorial) and run:
Pipenv will install the excellent Requests library and create a Pipfile
for you in your project’s directory. The Pipfile is used to track whichdependencies your project needs in case you need to re-install them, such aswhen you share your project with others. You should get output similar to this(although the exact paths shown will vary):
Using installed packages¶
Now that Requests is installed you can create a simple main.py
file touse it:
Install Python Via Homebrew
Then you can run this script using pipenvrun
:
You should get output similar to this:
Using $pipenvrun
ensures that your installed packages are available toyour script. It’s also possible to spawn a new shell that ensures all commandshave access to your installed packages with $pipenvshell
.
Install Python 3.8 Using Homebrew
Next steps¶
Install Python Via Homebrew
Congratulations, you now know how to install and use Python packages! ✨ 🍰 ✨