Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get an error "[Errno 42] Illegal byte sequence" when trying to install pillow using pip?

Tags:

python

pip

I want to install pillow, but when I run pip install pillow in the cmd I get the following message:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pillow
  Downloading https://files.pythonhosted.org/packages/5e/b6/8960697526a79bd1cb4520293078be3a10d725f23f20abbee298ebdeaabd/Pillow-6.2.2-cp27-cp27m-win_amd64.whl (1.9MB)
     |ERROR: Could not install packages due to an EnvironmentError: [Errno 42] Illegal byte sequence

WARNING: You are using pip version 19.2.3, however version 20.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Python 3.8.2 is already installed on my computer and I added it to PATH.

I also ran python -m pip install --upgrade pip and nothing has changed.

What is the problem? Do I need to update the Python version?

like image 847
Shir Cohen Avatar asked Dec 15 '25 00:12

Shir Cohen


1 Answers

Installation using third party PPA repository

Step 1: First install the Ubuntu software properties package if it’s not already installed on your system.

$ sudo apt update

$ sudo apt install software-properties-common

Step 2: After that run the commands to add the PPA.

$ sudo add-apt-repository ppa:deadsnakes/ppa

Step 3: Finally, run below to install Python 3.8

$ sudo apt update
$ sudo apt install python3.8

You can check as below:

$ python3 --version

Python 3.8.1

OK done.

like image 131
Tharun Vempati Avatar answered Dec 16 '25 13:12

Tharun Vempati