How to use psd-tools with python

Question:

I am trying to parse psd files and I found these tool Psd-Tools.
Just so you know, I am new into the python environment.

I have followed the following steps and everything went well:

pip install psd-tools
pip install docopt
pip install Pillow
pip install packbits

I can see them when I write pip freeze. But I can’t see any of these modules in python with this command:

>>> help('modules')

Obviously, when I try to use it, I get this error:

>>> from psd_tools import PSDImage
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named psd_tools

I have python-2.7.3 and python3-3.3.0 installed on my mac. Whether I launch python or python3, none of them find the psd_tools module.

So my guess was that the module has a different name, but none of these seems to work "psd-tools" 'psd-tools' psd-tools.

Maybe I missed a step with pip? Or the module name has changed, then how can I see it ?
Did anyone already use Psd-Tools?

Asked By: Micka

||

Answers:

Try to use install it from the source, from the GitHub repository of the project.

Answered By: 4d4c

I’d do python --version and pip --version to see what version of Python each of them are using. It’s possible one or both are not what you expect.

FWIW, pip install psd-tools then import psd_tools worked fine for me on OSX on 2.7.

Answered By: dougstar

I think you are doing it right, if pip version matches python version.

Answered By: Jeong Minu

hi i was also interested recently and i found this

Answered By: transhacker
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.