In a new SnowLeopard install, I'd like to use homebrew to install PIL. However the recipe installs PIL under cellar instead of in /Library/Python/2.6/site-packages. Is there a way to change the install directory?
Instead of installing pip and another PIL, you can just make a symlink
brew install pil
ln -s /usr/local/Cellar/pil/1.1.7/lib/python2.7/site-packages/PIL /Library/Python/2.7/site-packages/PIL
Tested on Lion, on Snow Leopard, you may need to change paths to use /python2.6 /Python/2.6.
It seems that Pillow replaced PIL in homebrew. The new command is:
brew install Homebrew/python/pillow
Since there seems to be no "accepted" way of installing homebrew eggs into the system site-packages, here is what I ended up doing:
% brew install pil
% easy_install pip
% pip install pil
The homebrew install grabs and installs all of PIL's dependencies (especially jpeg). The later easy_install then uses them when compiling PIL for the system site-packages. Freetype support doesn't show up in the "easy-installed" version, but that's fine for my purposes.
As my initial goal was to provide a simple way for a web designer to build a django development environment, having an unused homebrew PIL installed is not really a problem.
Hope this helps someone. Still hoping there's a better answer out there.
As #BarnabasSzabolcs mentioned, newer versions named pillow.
an alternative to brew install Homebrew/python/pillow is pip install pillow. You may need to add sudo, depends on your python environment permissions.
p.s.
that answer could be fit better as a comment, 14 credits to go...
Related
Is there an option to install SciPy on Windows without installing Anaconda as well? I could not do it via pip and everywhere it says to use Anaconda.
More details:
I want the SciPy package without any additional programs like Python(x, y) or Canopy.
The error with pip is: numpy.distutils.system_info.NotFoundError: no lapack/blas resources found. From research I found that I need to use additional packages but it sounds strange to me. I couldn't install LAPACK or BLAS.
There are unofficial builds: http://www.lfd.uci.edu/~gohlke/pythonlibs. Here's a link to scipy: http://www.lfd.uci.edu/~gohlke/pythonlibs#scipy
You can proceed with installing numpy or scipy using pip, after you install lapack and blas, which are system libraries. It shouldn't be very hard, but depends on you OS.
For RedHat/CentOS/Fedora this could be done with:
yum install lapack lapack-devel blas blas-devel
The packages can be found e.g. in CentOS base repository.
However, the scikit-learn website says as follows:
We don’t recommend installing scipy or numpy using pip on linux, as this will involve a lengthy build-process with many dependencies. Without careful configuration, building numpy yourself can lead to an installation that is much slower than it should be. If you are using Linux, consider using your package manager to install scikit-learn. It is usually the easiest way, but might not provide the newest version. If you haven’t already installed numpy and scipy and can’t install them via your operation system, it is recommended to use a third party distribution.
Package managers are usually yum or apt-get and again on RedHat/CentOS/Fedora you can skip using pip and install this way:
yum install scipy
Third party distributions mentioned above are things like anaconda or Python(x,y).
I would like to use psd-tools package from github.
Given I am not a programer, I found the installation process difficult to follow.
Can someone advice in simple terms how to install and use the psd-tool package.
Apparently, this is all done via the terminal in OSX.
If I understand correctly the package requires python, pip, pillow and packbits to run correctly.
Python is pre installed in OSX. Pip and packbits need to be installed. This where I start to get lost with the installation procedure.
Once the psd-tools package is installed, I am not sure how to call the package to test a psd file.
github psd-tools package
Download Python package for working with Adobe Photoshop PSD files
Installation
pip install psd-tools
Pillow should be installed if you want work with PSD image and layer data: export images to PNG, process them. PIL library should also work.
pip install Pillow
Note
In order to extract images from 32bit PSD files PIL/Pillow must be built with LITTLECMS or LITTLECMS2 support.
psd-tools also has a rudimentary support for Pymaging. Pymaging installation instructions are available in pymaging docs. If you want to use Pymaging instead of Pillow you'll also need packbits library:
pip install packbits
Usage of PSD-Tools and How to use it Read this.
Hope it Helps!
I have a brand new CentOS 6 box and wanted to install sphinx, in order to compile documents as generated by readthedocs.org i.e. rst files.
In a previous ubuntu box I was running
make html
and that would invoke the
sphinx-build
command and compile the documentation.
I downloaded the latest version of sphinx and installed it as such:
sudo wget http://sphinxsearch.com/files/sphinx-2.1.9-1.rhel6.x86_64.rpm
sudo localinstall sphinx-2.1.9-1.rhel6.x86_64.rpm
Everything seems to be fine but sphinx-build is nowhere to be found.
Any pointers are more than appreciated.
You are mixing up two different tools named Sphinx: the full text search server (http://sphinxsearch.com/) and the documentaton generator (http://sphinx-doc.org/). You need the latter tool in order to compile documents usingsphinx-build.
You can also install rpm package of sphinx (Python documentation generator) with yum at CentOS 6 using:
yum install python-sphinx.noarch
at Fedora 20 using:
yum install python-sphinx-doc.noarch
A short addup, according to offical document, one just need to run
pip install Sphinx to install the python documentation generator, sphinx. Or it can be downloaded from distribution package.
YUM doesn't have upstart. I installed the package under NPM, but I don't think that's what I want. I know there's a package for apt-get, but CentOS doesn't have apt-get (at least, not by default).
So... pretty newbie question, I know, but how do I install under CentOS 5.9?
If you've got software that's in Debian package manager (apt-get) format, and you want to install it on a Linux that uses RPM (yum) format ...
... your best bet is to install something like RPMForge:
http://everyday-tech.com/apt-get-on-centos/
I'm good at installing package in Linux environment but newbie to Solaris OS. I need to install Python - libxml2 package to my project. Does the below command also work in Solaris server for installation??
sudo apt-get install libxml2 libxml2-dev
I have tried googling, unfortunately not able to get.
What you proposed is specific to Debian-based Linux distributions.
IMHO, the fastest way would be to download the libxml2 source code in order to compile and install it yourself.
If you're running Solaris 11, then pkg install libxml2 with sufficient privilege would be the right invocation. Determining the right package name is as simple as pkg search with a reasonable query (assuming that you're still connected to the repository from which you installed the system).
If you're running Solaris 10 or older, then you'll need the original install media, plus whatever patches have been issued that intersect SUNWlxml. But frankly, installing from source is probably easier at that point.