简体   繁体   English

在Mac OS X Mavericks Python 2.7上是否有简单的方法来安装Pillow?

[英]Is there an easy way to install Pillow on Mac OS X Mavericks Python 2.7?

I don't want to mess up with Xcode and stuff like that. 我不想弄乱Xcode之类的东西。 I've tried a few command line installations but nothing seemed to work smoothly and I can't figure it out. 我已经尝试了一些命令行安装,但是似乎没有任何工作可以顺利进行,我无法弄清楚。 Is there a way for someone who doesn't know a lot about programming to install Pillow? 对于不了解编程的人是否有办法安装Pillow? (Bonus points if you can give me an installation file that just does it all for you, that's the way I've done it on my Windows). (如果您可以给我一个安装文件,它可以帮您完成所有工作,那么这就是我在Windows上所做的工作。) Thank you! 谢谢!

sudo easy_install pip

will install pip for you and then 将为您安装点子,然后

pip install Pillow

will install Pillow as @dqiu mentioned. 将按照@dqiu所述安装Pillow。

You can use Python's package manager pip . 您可以使用Python的软件包管理器pip

pip install Pillow should do the trick to install it. pip install Pillow应该pip install Pillow安装它。

You can see all the other ways on the webpage for Pillow . 您可以在Pillow网页上看到所有其他方式。

You should follow these steps, as detailed in the pip documentation : 您应该按照以下步骤进行操作,如pip文档中所述

  1. Download get-pip.py . 下载get-pip.py Right click on the link and download the file. 右键单击链接并下载文件。

  2. Open your Terminal 打开您的终端

  3. Type sudo python ~/Downloads/get-pip.py (if the file is in the default Downloads folder). 键入sudo python ~/Downloads/get-pip.py (如果文件位于默认的Downloads文件夹中)。 Or type the full path to the file. 或键入文件的完整路径。

  4. You will be prompted for a password, type your normal user password. 系统将提示您输入密码,键入您的普通用户密码。

This script will install pip and setuptools (if its not already installed). 该脚本将安装pip和setuptools(如果尚未安装)。 Now you can proceed to install Pillow and other packages: 现在,您可以继续安装Pillow和其他软件包:

pip install Pillow

If you run into problems, have a look at Installing Pillow/PIL on Mavericks . 如果遇到问题,请参阅在Mavericks安装枕头/ PIL

virtualenv worked for me! virtualenv为我工作!

sudo pip install virtualenv
virtualenv python_script && cd !$
. /activate/bin
pip install Pillow

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM