Support when installing pillow on python3.9

Correspondence memo when an error occurs when trying to install pillow on python3.9. The conclusion is that python3.9 was downgraded to python3.8 series and the installation was successful.


$ python3 -V
Python 3.9.0
$ pip3 list
Package    Version
---------- -------
pip        19.2.3 
setuptools 41.2.0 
six        1.15.0 
wheel      0.33.1 

Install pillow.


$ pip3 install pillow
Collecting pillow
  Using cached Pillow-7.2.0.tar.gz (39.1 MB)
Using legacy 'setup.py install' for pillow, since package 'wheel' is not installed.
Installing collected packages: pillow
    Running setup.py install for pillow ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/bh/qn_1nbf10t93r800p2nf70840000gn/T/pip-install-2tumuz0z/pillow/setup.py'"'"'; __file__='"'"'/private/var/folders/bh/qn_1nbf10t93r800p2nf70840000gn/T/pip-install-2tumuz0z/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/bh/qn_1nbf10t93r800p2nf70840000gn/T/pip-record-mj6xe2pw/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pillow

(Omitted)

It seems that pillow does not support python3.9.0. Uninstall python3.9.0.


$ sudo rm -rf  /Library/Frameworks/Python.framework

To install python3.8 series, first install pyenv.


$ brew install pyenv

Pass the path to pyenv.


$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

Install python 3.8.6.


$ pyenv install 3.8.6
$ pyenv versions
* system (set by /Users/hoge/.pyenv/version)
  3.8.6
$ python3 -V
Python 3.8.6

Reinstall pillow.


$sudo  pip3 install pillow
$ pip3 list
Package    Version
---------- -------
Pillow     7.2.0  ★
pip        19.2.3 
setuptools 41.2.0 
six        1.15.0 
wheel      0.33.1 

that's all.

Recommended Posts

Support when installing pillow on python3.9
Installing pandas on python2.6
Notes on installing Python on Mac
Notes on installing Python on CentOS
[python] Error when installing library ramkan
Install Python Pillow on Amazon Linux
Installing Kivy on Windows10 64bit Python3.5
Installing Python 3.4.3.
Installing Kivy-Designer on Windows10 64bit Python3.5
Notes on installing Python using PyEnv
Error and solution when installing python3 with homebrew on mac (catalina 10.15)
Error resolution when installing numba on macOS
A struggle when installing pyenv on Cygwin
Installing Anaconda Python on an ECS instance
Use without installing python 2.x on Windows
Installing PIL with Python 3.x on macOS
Check! Troubleshooting when installing PyObjc on Mac
Python on Windows
twitter on python3
python on mac
Python on Windbg
Notes on installing Python3 and using pip on Windows7
Note on encoding when LANG = C in Python
[Note] Installing Python 3.6 + α on Windows and RHEL
Installing TensorFlow on Windows Easy for Python beginners
Solution when aws-cli cannot be executed on Mac virtual environment (after installing Python 3.8)
To avoid seeing hell when installing django-toolbelt on windows, heroku and python3.4 (64bit) ...
Python conda on cygwin
[Grasshopper] When creating a data tree on Python script
Install python on WSL
PyOpenGL setup on Python 3
Install Scrapy on python3
Stumbled when installing PyOCR
Install Python on Mac
Install Python 3 on Mac
Install Python3.4 on CentOS 6.6
Notes on installing PycURL
Check types_map when using mimetypes on AWS Lambda (Python)
python basic on windows ②
Support for Python 2.7 runtime on AWS Lambda (as of 2020.1)
Install python on windows
Installing Python 3 on Mac and checking basic operation Part 1
Troublesome story when using Python3 with VScode on ubuntu
Install Python 2.7.3 on CentOS 5.4
Precautions when installing fbprophet
About the --enable-shared option when building Python on Linux
build Python on Ubuntu
Install Python 3.3 on Ubuntu 12.04
Install Python 3.4 on Mac
Installing pyenv on ubuntu 16.04
Minimum memo when using Python on Mac (pyenv edition)
Install Python 3.6 on Docker
Minimum notes when using Python on Mac (Homebrew edition)
[GCP] A memorandum when running a Python program on Cloud Functions
Precautions and solutions when installing Ubuntu on NVIDIA GeForce PCs
(Note) Points to be addicted to when installing Scilab on ArchLinux
When you want to hit a UNIX command on Python
List of libraries to install when installing Python using Pyenv
Set-enable Python virtualenv on Windows
Set up Python 3.4 on Ubuntu
Error handling when installing mecab-python