且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Mac上将PIL安装到Python 3.5?

更新时间:2023-01-14 22:18:57

在您的命令行上:

$ which python

我敢打赌这会返回:

/Library/Python/2.7/site-packages

/Library/Python/2.7/site-packages

这显示了您的基本" Python(在Mac上预装了)位置.现在执行:

This shows your 'basic' Python (which comes preinstalled on Mac) location. Now do:

$ which python3

如果显示以下内容:

/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5'

/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5'

然后检查pip3版本:

$ which pip3

如果存在并且位置与python3类似,请尝试以下操作:

If that exists and has a similar location to python3, then try this:

$ pip3 install Pillow

如果有效,PyCharm现在很有可能会选择正确的安装.

If that works, there is a good chance PyCharm will now pick up the correct installation.