Error legacy install failure python

Python provides you with a package installer called 'pip.' 'Pip' allows you to write a line of code to install packages and manage them. Although

Python provides you with a package installer called ‘pip.’ ‘Pip’ allows you to write a line of code to install packages and manage them. Although sometimes, when you are installing some packages, you might get an ‘error: legacy-install-failure.’ For example, if you are trying to install the gensim package in python. To know more about ‘pip’ check out this post.

How To Solve Error: legacy-install-failure?

Solving ‘ Error: legacy-install-failure’

Output:

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gensim

In this article, we will discuss how we can solve this error.

Pip is a package installer and manager, and the wheel is a way that pip prefers to install packages because the wheel allows fast and efficient installations and are smaller in comparison to eggs. Hence upgrading wheels might also solve the problem of ‘error: legacy-install-failure.’ The setuptools enhance the over-installation by enhancing the python standard library distribution utilities. Therefore if you update these modules, it might solve your error because this error can also arise if one of these modules is not up-to-date. Let us see how we can upgrade these modules.

  • First, update your pip installer as shown below.
python - m pip install – upgrade pip
  • Then upgrade your wheel by using:
pip install - upgrade wheel
  • Then finally upgrade the setuptools.
pip install - upgrade setuptools
  • And then again try to install the package which was throwing error in the first place.

Solve error: legacy-install-failure In Pandas

Pandas is an open-source library in python which allows users to perform high-level data manipulation. It is one of the most important libraries in python in the sense of data structure programming and data analysis because it provides flexible, fast and expressive data structures. However, sometimes when you try to install this library using pip, you can get an ‘error: legacy-install-failure,’ which can prevent us from using this very important library. Let us see how we can solve this error in python.

To solve this problem, you need to install ‘pipwin’ because it may happen that the ‘pandas’ wheel might not support the python version you are working on; therefore, first, install ‘pipwin’.

And further, when you install ‘pipwin,’ install ‘pandas’ using ‘pipwin.’

This should probably solve the ‘error: legacy-install-failure’ and allow you to install the pandas library and use it.

Solve error: legacy-install-failure For Basemap

Basemap is a tool in python that provides you to create maps in a very easy and simple way. It is an extension of the ‘matplotlib‘ library; therefore, it contains all the features for carrying out data visualization. It further adds geographical projections and some other additional data sets in order to enable plotting coastlines, countries, states, boundaries and etc., directly from the library. Similarly, when you try to install this library through ‘pip,’ you might face a Solve ‘ error: legacy-install-failure’. We will discuss how we can solve this error for the basemap library.

Solving For Windows Operating System

If you are using Windows operating system and encounter this error you need to follow some steps. The steps are as given below:

  • First, go this path https://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap
  • You will be directed to the file directory. If you’re using python 3.10.x, download the file named ‘basemap‑1.3.2‑cp310‑cp310‑win_amd64.whl
  • Now go to this wheel file and run the following command:
pip install basemap‑1.3.2‑cp310‑cp310‑win_amd64.whl

Doing this should solve the ‘error: legacy-install-failure’ error.

Solving For MAC Operating System

If you are using MAC Operating System and encounter this error, you need to follow some steps. The steps are as given below:

  • First, make sure you install all the packages as shown below:
brew install geos
brew install matplotlib
brew install numpy
brew install proj
  • Then you have to add GEOS_DIR = “/ user / local / Cellar / geos / 3.10.2 /” to your .bash profile and reload it via: source ~/.bash_profile. You can do that by :
git clone --depth 1 https://github.com/matplotlib/basemap.git
  • Further, go to the basemap directory from the path: basemap/packages/ basemap. And finally, run the install code from that directory.

This should solve the ‘error: legacy-install-failure’ error.

Solving For Google Colab

To solve this error in google colab, you need to run the commands given below, and doing that should solve the ‘error: legacy-install-failure’ error.

!sudo apt-get install libgeos-3.6.2
!sudo apt-get install libgeos-dev
!pip install git+https://github.com/matplotlib/basemap#subdirectory=packages/basemap

Solve error: legacy-install-failure For MySQL

MySQL provides services for handling and managing databases. When you connect your python application to an active server, you can manage all your database using MySQL. Although when installing using an ‘Error: legacy-install-failure’ error might occur. It can display something like this.

  note: This error originates from a subprocess, and is likely not a problem with 
pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mysqlclient

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

To solve this following error, you will need to follow the steps given below:

  • First, run the commands given below
xcode-select --install
brew install zstd
pip install pymysql
pip install wheel 
CFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib" pip install mysqlclient==<version>
  • Further, make some changes in the settings file if you are using some framework like Django or any other. To make this change run these commands.
import pymysql
pymysql.install_as_MySQLdb()

Further, install all other dependencies in the env/lib/python3.8/site-packages/django/db/backends/mysql/base.py directory. These dependencies can be installed like:

pip install mysql-connector-python
pip install cryptography
  • Now try to install MySQL again, as following these steps should solve the error.

Solve error: legacy-install-failure For Wxpython

Wxpython is a cross-platform Graphical User Interface toolkit for python language. It enables the users to program independent and robust code, which provides a very high graphical user interface very easily and quite simply. This library, like many other libraries, is open source. Although sometimes, while installing ‘wxPython,’ you might face an ‘error: legacy-install-failure’ error.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> wxPython

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

This error might occur because you might be using a python version that is not compatible with ‘wxPython.’ Therefore the easiest solution is to downgrade your python version to 3.9.13 because the last version of ‘wxPython’ came before python 3.10. There might be an alternative solution to this, but right now, this is the easiest solution.

Solve error: legacy-install-failure For Psycopg2-binary

To solve this error, you have to follow some steps. You can solve this problem by upgrading some packages.

pip uninstall psycopg2
pip list --outdated
pip install --upgrade wheel
pip install --upgrade setuptools
pip install psycopg2

This code will upgrade some outdated packages and might solve the problem.

Solve Error legacy-install-failure For Cffi

When you are programming on Django, you might get an error while installing libraries. You can solve this error by the following code.

RUN python -m venv /py && 
   /py/bin/pip install --upgrade pip && 
   apk add --update alpine-sdk && 
   apk add --update --no-cache postgresql-client && 
   apk add --update --no-cache --virtual .tmp-build-deps 
      build-base gcc python3-dev postgresql-dev musl-dev libffi-dev openssl-dev cargo  && 
   /py/bin/pip install -r /tmp/requirements.txt && 
   if [ $DEV = "true" ]; 
      then /py/bin/pip install -r /tmp/requirements.dev.txt ; 
   fi && 
   rm -rf /tmp && 
   apk del .tmp-build-deps && 
   adduser 
      --disabled-password 
      --no-create-home 
      django-user

Solve error: legacy-install-failure For Dlib

You can also get an error while installing the ‘dlib’ library through pip. To solve this error, try to install the library from scratch by following the steps.

  • First, install ‘anaconda.’
  • Further activate the virtual environment through a command prompt.
  • Install ‘opencv’ using pip.
  • Install ‘dlib’ using pip.

This will eventually solve your error.

Solve Error legacy-install-failure For Fbprophet

You can encounter an error while installing Facebook prophet using pip. This error occurs because you might not have installed dependencies for the wheel to be installed. You can solve this error by installing all the dependencies and then installing the ‘fbprophet’ using pip.

Solve error: legacy-install-failure For Horovod

When you are trying to install ‘horvord’ with ‘PyTorch,’ you might encounter an error of sort ‘error: legacy-install-failure’.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> horovod

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure. 

This error occurs because an older version of ‘horovord’ than 0.24.0 is not compatible with PyTorch. Therefore you can solve this error by upgrading ‘horovord’ to newer versions.

[Resolved] NameError: Name _mysql is Not Defined

FAQs on Error: legacy-install-failure

How can you solve ‘error: legacy-install-failure’?

There are many ways you can solve this error, and we have discussed some of them in this article. You can follow those solutions to solve this error depending upon the library you want to install.

How to upgrade setuptools with pip?

You can upgrade setuptool with pip using the following command:
pip install - upgrade setuptools

Can you pip install pandas?

You can pip install pandas from PyPI.

Conclusion

Finally conclude, we can say that we have discussed various methods in this article to solve the ‘error: legacy-install-failure’ error which occurs for different libraries and modules. You can use any of the methods according to your requirements and according to the library or modules, you want to install for your program.

Trending Python Articles

  • “Other Commands Don’t Work After on_message” in Discord Bots

    “Other Commands Don’t Work After on_message” in Discord Bots

    February 5, 2023

  • Botocore.Exceptions.NoCredentialsError: Unable to Locate Credentials

    Botocore.Exceptions.NoCredentialsError: Unable to Locate Credentials

    by Rahul Kumar YadavFebruary 5, 2023

  • [Resolved] NameError: Name _mysql is Not Defined

    [Resolved] NameError: Name _mysql is Not Defined

    by Rahul Kumar YadavFebruary 5, 2023

  • Best Ways to Implement Regex New Line in Python

    Best Ways to Implement Regex New Line in Python

    by Rahul Kumar YadavFebruary 5, 2023

I want to install gensim python package via pip install gensim

But this error occurs and I have no idea what should I do to solve it.

      running build_ext
      building 'gensim.models.word2vec_inner' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gensim

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

asked Feb 28, 2022 at 13:37

Peyman's user avatar

2

If you fail to install plugins,
you can download it from other repositories like this one:
repository depends on the version of python and the system.

for example: for windows 11(x64) and python 3.10 you should take this file: gensim‑4.1.2‑cp310‑cp310‑win_amd64.whl

answered Feb 28, 2022 at 14:05

Roopa M's user avatar

Roopa MRoopa M

1,4332 silver badges11 bronze badges

When I am trying to install gensim python package via pip install gensim. Then I am facing note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
, this error.

In this article, we will discuss about this error: legacy-install-failure error in Python. And how to resolve the error all the possible solutions with examples.

How to error: legacy-install-failure Error Occurs?

I am just installed gensim python package via pip install gensim, then I am getting error looks like the below:

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

How To Fix error: legacy-install-failure?

There are different ways to fix error: legacy-install-failure this error. Let us take a look at every solution.

  • How To Fix error: legacy-install-failure?

To Solve error: legacy-install-failure If you are windows 110 OR 11(x64) and python 3.10 Then you should take this file: gensim‑4.1.2‑cp310‑cp310‑win_amd64.whl. I hope your error is now solved.

  • error: legacy-install-failure

To Solve error: legacy-install-failure, you have to upgrade wheel with this Command Commandline pip install –upgrade wheel Now, Try to Upgrade your setuptools with this commandline pip install –upgrade setuptools Now, Try to install gensim again with this command: pip install gensim OR pip3 install gensim. I hope now your error will be solved.

Solution 1: Upgrade pip, wheel and setuptools

  1. First you have to Upgrade your pip with this command line python -m pip install –upgrade pip
  2. Then, Upgrade your wheel with this Commandline pip install –upgrade wheel
  3. Now, Try to Upgrade your setuptools with this commandline pip install –upgrade setuptools
  4. Now, Try to install gensim again with this command: pip install gensim OR pip3 install gensim.

Now, your error will be solved.

Solution 3: Download Microsoft c++ build tools

Try To Download Microsoft c++ build tools. And then Install It in Your system. Now, Make Sure to Check the Desktop development with C++ and install it.

You can also achieve the same automatically using the following command.

vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools

as installation is complete you can install gensim again with this command: pip install gensim OR pip3 install gensim. Now, your error must be solved.

Conclusion

In this article, we have discussed what causes the error and we have discussed ways to fix the error.

we hope this article has been informative. Thank you for reading. Kindly comment and let us know if you found it helpful.

Today We are Going To Solve python pip: “error: legacy-install-failure” in Python. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

Contents

  • 1 How to Fix python pip: “error: legacy-install-failure” Error?
    • 1.1 Solution 1 : Upgrade pip wheel and setuptools
  • 2 Conclusion
    • 2.1 Also Read These Solutions
  1. How to Fix python pip: “error: legacy-install-failure” Error?

    To Fix python pip: “error: legacy-install-failure” Error just Upgrade pip wheel and setuptools. Upgrade your pip with this python -m pip install –upgrade pip And after it Upgrades your wheel with this pip install –upgrade wheel Then upgrade your setuptools with this pip install –upgrade setuptools and then just run the below command pip install gensim

  2. python pip: “error: legacy-install-failure”

    To Fix python pip: “error: legacy-install-failure” Error just Upgrade pip wheel and setuptools. Upgrade your pip with this python -m pip install –upgrade pip And after it Upgrades your wheel with this pip install –upgrade wheel Then upgrade your setuptools with this pip install –upgrade setuptools and then just run the below command pip install gensim

Solution 1 : Upgrade pip wheel and setuptools

Upgrade your pip with this python -m pip install –upgrade pip

And after it Upgrades your wheel with this pip install –upgrade wheel

Then upgrade your setuptools with this pip install –upgrade setuptools and then just run the below command

pip install gensim

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read These Solutions

  • ERROR: Failed building wheel for numpy , ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
  • Python/Docker ImportError: cannot import name ‘json’ from itsdangerous
  • ImportError: cannot import name ‘Markup’ from ‘jinja2’
  • ImportError: cannot import name ‘_unicodefun’ from ‘click’
  • Issues installing Python 3.8.10 on macOS 12.3 Monterey

When running a pip install command, you might encounter a Python error that says error: legacy-install-failure.

For example, I got this error when installing locustio package:

$ pip3 install locustio
Collecting locustio
...
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> locustio

This error happens because there’s an issue with the package you are trying to install.

To fix this error, you need to see the error output for hints.

Here are a few steps you can take to troubleshoot and fix this error:

Before you run another install, try to upgrade your pip, wheel, and setuptools to the latest version first:

# upgrade pip
pip install --upgrade pip

# or if you have pip3
pip3 install --upgrade pip

# if you don't have pip in PATH
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip

# for Windows
py -m pip install --upgrade pip

# upgrade setuptools and wheel

pip install --upgrade setuptools wheel
pip3 install --upgrade setuptools wheel

python -m pip install --upgrade setuptools wheel
python3 -m pip install --upgrade setuptools wheel
py -m pip install --upgrade setuptools wheel

Once you upgraded these packages, try installing the package again.

If successful, you can skip the solutions below.

Check if the package has moved to a different name

This error can appear when the package you want to install has moved to a different name.

In case of the locustio package, the developers have moved the package name to locust as shown in the error message:

**** Locust package has moved from 'locustio' to 'locust'. 
Please update your reference (or pin your version to 0.14.6 
if you dont want to update to 1.0) ****
      
      [end of output]

This means you need to change the package name when running pip install:

pip install locust  # ✅
# or
pip3 install locust  # ✅

With that, you should be able to install the package without any issue.

For macOS: Ensure you have an active developer path

If you’re on Mac, you might require the Xcode Command Line Tools to fix this error.

You can tell if you need the tools when you have this error message:

xcrun: error: invalid active developer path ...
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

The above error means you need to install the Xcode Command Line Tools.

Run the following command:

And you should be able to install the package without issue.

If you’re on Windows, you might require Microsoft Visual C++ compiler to fix this error.

The error message should tell you as shown below:

error: Microsoft Visual C++ 14.0 or greater is required. 
Get it with "Microsoft C++ Build Tools": 
<https://visualstudio.microsoft.com/visual-cpp-build-tools/>

      [end of output]

You need to install the compiler version that’s compatible with your Python version:

Compiler 14.x for Python 3.5 — 3.10
Compiler 10.0 for Python 3.3 — 3.4
Compiler 9.0 for Python 2.6-2.7, 3.0 — 3.2

The compiler is included in Microsoft Visual Studio, so you can install Visual Studio and activate Python development workload as follows:

You can also activate Data Science workload as an extra.

If you already have Visual Studio installed, activate the workload from the menu Tools > Get Tools and Features.

Alternatively, you can also install stand-alone Microsoft C++ Build Tools.

Once you have the build tools installed, you should be able to install the package.

If you still can’t install the package, you can try to download the wheel distribution and install it directly on your computer

For example, suppose you want to install the gensim package. You can look into the pypi.org files directory as shown below:

You need to download the right wheel distribution for your system. If you use Windows, download the file with win_ in its name.

macOS should use the macosx_ packages (x86_64 for Intel Mac, universal for Apple Silicone)

Finally, Linux users should use the manylinux_ packages (x86_64 for Intel devices, aarch64 for ARM devices)

After you download the file, install it using pip as follows:

pip install gensim-4.3.0-cp311-cp311-win_amd64.whl
# or
pip3 install gensim-4.3.0-cp311-cp311-win_amd64.whl

A wheel package can be installed without going through the build process, so you don’t need to install the build tools anymore.

Conclusion

The solution to the error: legacy-install-failure depends on what package you are trying to install with pip.

Some packages may have been moved to a different name, some may need the build tools for the Operating System to be available.

If all else fails, try to download the .whl package directly from pypi.org and install it yourself.

I hope this article helps you fix the legacy-install-failure error in Python. 🙏

Programming these days has become far easier thanks to the number of different libraries and tools available to us. However, as simple as its supposed to be, there are still random bugs and errors that might hinder your progress.

In this article, we’re taking a look at the “error: legacy-install-failure” issue in Pip when installing a package. 

Also read: How to solve the Tower of Hanoi problem using Python?


Why does this happen?

The error usually gets triggered when you try to install the gensim Python package. The error itself is most likely generated from a subprocess and is not a problem with Pip itself. 


How to fix this?

Here are three fixes you can try out.

Update Pip and its dependencies

The first thing you should do in such situations is to update Pip, wheel and setuptools. Just enter the following commands one after another. 

python -m pip install –upgrade pip
pip install –upgrade wheel
pip install –upgrade setuptools

Once you’re done updating everything, try to install the package again using either of the following commands.

pip install gensim

Or

pip3 install gensim

Another solution to the problem, one that the error message itself will likely suggest is to download and install Microsoft C++ build tools. The download process is rather simple as well, just head over to this website and download the desktop environment with C++. Once the download is complete, run the installer and your error should be resolved.

Alternatively, you can use the following command in the Command Prompt. 

vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools

Once installation is complete, run the aforementioned command to install the gensim package again. 


Using unofficial Windows Binaries 

Although we don’t recommend downloading binaries or system files from third-party sources, this might be the last resort if you absolutely have to use gensim. 

If you’re running Windows 10 or 11 (x64) and have Python 3.10 or above, you need to visit this link and download the gensim‑4.1.2‑cp310‑cp310‑win_amd64.whl file. Once downloaded, install the file with pip using the following command. 

pip install [path to wheel file]

The problem should be gone now.

Also read: Is Python case sensitive when dealing with identifiers?

Yadullah Abidi

Someone who writes/edits/shoots/hosts all things tech and when he’s not, streams himself racing virtual cars.

You can contact him here: [email protected]

To solve error: legacy-install-failure You just need to update Your PIP and then try to update your wheel and then setuptools and then your error will be resolved.

Contents

  1. Solution 1: Upgrade pip, wheel, and setup tools
  2. Solution 2: Use Unofficial Windows Binaries
  3. Solution 3: Download Microsoft c++ build tools
  4. Solution 4: Run this command
  5. Frequently Asked Questions
  6. Conclusion
  1. First Of all Just Upgrade your pip with this command line python -m pip install –upgrade pip
  2. Then, Upgrade your wheel with this Commandline pip install –upgrade wheel
  3. Now, Try to Upgrade your setuptools with this commandline pip install –upgrade setuptools
  4. Now, Try to install gensim again with this command: pip install gensim OR pip3 install gensim.
  5. Hope Now, Your error must be solved.

Solution 2: Use Unofficial Windows Binaries

Try to use Unofficial Windows Binaries for Python Extension Packages If you are windows 110 OR 11(x64) and python 3.10 Then you should take this file: gensim‑4.1.2‑cp310‑cp310‑win_amd64.whl. Hope Now, Your error should be solved.

Try To Download Microsoft c++ build tools. And then Install It in Your system. Now, Make Sure to Check the Desktop development with C++ and install it as given in the below screenshot.

You can also achieve the same automatically using the following command.

vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools

as the installation is complete you can install gensim again with this command: pip install gensim OR pip3 install gensim. Now, your error must be solved.

Solution 4: Run this command

Just run all the given commands one by one.

python - m pip install – upgrade pip
pip install - upgrade wheel
pip install - upgrade setuptools

Now, Your error will be solved.

Frequently Asked Questions

  1. How To Solve error: legacy-install-failure?

    To Solve error: legacy-install-failure Try to use Unofficial Windows Binaries for Python Extension Packages If you are windows 110 OR 11(x64) and python 3.10 Then you should take this file: gensim‑4.1.2‑cp310‑cp310‑win_amd64.whl. Hope Now, Your error should be solved.

  2. error: legacy-install-failure

    To Solve error: legacy-install-failure Then, Upgrade your wheel with this Commandline pip install –upgrade wheel Now, Try to Upgrade your setuptools with this commandline pip install –upgrade setuptools Now, Try to install gensim again with this command: pip install gensim OR pip3 install gensim. Hope Now, Your error must be solved.

Conclusion

You need to upgrade PIP, Wheel and setuptools will resolve this error. Hope We solved Your error. Comment below with Your thoughts and your queries. Also, Comment below on which solution worked for you.

Also, Read

  • ValueError: I/O operation on closed file in Python
  • Can’t find Python executable “python”, you can set the PYTHON env variable
  • How To upgrade the Python installation in Windows 10?

In Python, you can install library packages with the pip command. Using pip is convenient because you only need to copy or type a command to install and manage. Sometimes in the process of installing a library, you will encounter the error “Error: legacy-install-failure with pip install”. Let’s find a solution together.

There are some libraries when you install it. This error will occur. Let’s look at the different cases.

When installing the gensim package

When you install Gensim with the following command:

pip install gensim

Error: legacy-install-failure with pip install can happen because you use an old version of pip, pip is used to install packages, and the wheel is for pip to reference. The solution in this case is to upgrade both pip and wheel

When installing the Pandas package

Pandas is a high-level library for manipulating data. It’s flexible and fast. The error may occur because Pandas does not support the version of Python that you are installing on your machine.

When installing the Basemap package

Basemap is a tool to help you quickly create maps. It’s based on the matplotlib library. It has geographic projections that allow plotting subcomponents, boundaries, etc. This library is very prone to errors when you install it via pip. The best way is to download and install it.

How to fix Error: legacy-install-failure with pip install

Depending on different library packages, there will be different solutions.

Solution when installing Gensim

The error may be caused by you using an old version of pip. Try upgrading pip and wheel

The first is to upgrade pip with the syntax:

python - m pip install – upgrade pip

Then upgrade the wheel with the syntax:

pip install - upgrade wheel

next upgrade setuptools

pip install - upgrade setuptools

And finally, proceed to install Gensim:

pip install gensim

Solution when installing Pandas

The cause of the error may be because Pandas does not support the version of pip you are using. Try installing via pipwin

First, install pipwin with the syntax:

pip install pipwin

Then use pipwin to install Pandas with the syntax:

pipwin install pandas

This can help you to solve the error and help you to install Pandas

Solution when installing Basemap

For Basemap, you should proceed to download by going to the following website and install it.

https://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap

Then if you are using Windows, you install the syntax:

pip install [basemap package that you have downloaded]

You can learn more about some common Python errors

Summary

The article has shown the cause of the Error: legacy-install-failure with pip install is mainly due to use old of versions, the best solution is to download directly the package you want to install and upgrade to the new pip version. Hope you resolve the error quickly.

Carolyn Hise has three years of software development expertise. Strong familiarity with the following languages is required: Python, Typescript/Nodejs, .Net, Java, C++, and a strong foundation in Object-oriented programming (OOP).

I was trying to install Matplotlib on my Mac via pip.
I am on MacOS 12.4, Have python 3.11.0b1 installed via pyenv.
I got pip version 22.1.2.

Here is the output of showing how my cli commands are aliased and versions output.

ot@OT % pyenv global && python -V && python3 -V && pip -V && pip3 -V 3.11.0b1 Python 3.11.0b1 Python 3.11.0b1 pip 22.1.2 from /Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/site-packages/pip (python 3.11) pip 22.1.2 from /Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/site-packages/pip (python 3.11)

When I try to install, with
ot@OT Pillow-9.1.1 % python -m pip install --no-cache-dir -U pillow --prefer-binary

I get this: (no further message in this post after the output below.)
I get the same error when trying to install from source.

Collecting pillow
Downloading Pillow-9.1.1.tar.gz (49.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.8/49.8 MB 2.6 MB/s eta 0:00:00
Preparing metadata (setup.py) … done
Building wheels for collected packages: pillow
Building wheel for pillow (setup.py) … error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [193 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-12.4-arm64-3.11
creating build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/_version.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/init.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/features.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/_util.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FitsImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/_binary.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/Image.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/main.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing requirements to src/Pillow.egg-info/requires.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file ‘src/Pillow.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching ‘.c’
warning: no files found matching ‘
.h’
warning: no files found matching ‘.sh’
warning: no files found matching ‘
.txt’
warning: no previously-included files found matching ‘.appveyor.yml’
warning: no previously-included files found matching ‘.clang-format’
warning: no previously-included files found matching ‘.coveragerc’
warning: no previously-included files found matching ‘.editorconfig’
warning: no previously-included files found matching ‘.readthedocs.yml’
warning: no previously-included files found matching ‘codecov.yml’
warning: no previously-included files matching ‘.git*’ found anywhere in distribution
warning: no previously-included files matching ‘.pyc’ found anywhere in distribution
warning: no previously-included files matching ‘
.so’ found anywhere in distribution
no previously-included directories found matching ‘.ci’
adding license file ‘LICENSE’
writing manifest file ‘src/Pillow.egg-info/SOURCES.txt’
running build_ext

  The headers or library files could not be found for jpeg,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
  
  Traceback (most recent call last):
    File "/private/var/folders/_6/3ksx9tjs5bg4vpm2jxkjnzrh0000gn/T/pip-install-t9mtx9_f/pillow_4aed4763f2c8457ab91cd6c5e20ecbd3/setup.py", line 989, in <module>
      setup(
      ^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/core.py", line 148, in setup
      dist.run_commands()
      ^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
      ^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
      ^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
      ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
      ^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
      ^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
      ^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
      ^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/_6/3ksx9tjs5bg4vpm2jxkjnzrh0000gn/T/pip-install-t9mtx9_f/pillow_4aed4763f2c8457ab91cd6c5e20ecbd3/setup.py", line 802, in build_extensions
      if not getattr(feature, f) and feature.require(f):
                                     ^^^^^^^^^^^^^^^^^^
  RequiredDependencyException: jpeg
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/_6/3ksx9tjs5bg4vpm2jxkjnzrh0000gn/T/pip-install-t9mtx9_f/pillow_4aed4763f2c8457ab91cd6c5e20ecbd3/setup.py", line 1009, in <module>
      raise RequiredDependencyException(msg)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  RequiredDependencyException:
  
  The headers or library files could not be found for jpeg,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
  
  
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pillow
Running setup.py clean for pillow
Failed to build pillow
Installing collected packages: pillow
Running setup.py install for pillow … error
error: subprocess-exited-with-error

× Running setup.py install for pillow did not run successfully.
│ exit code: 1
╰─> [196 lines of output]
running install
running build
running build_py
creating build
creating build/lib.macosx-12.4-arm64-3.11
creating build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageMode.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/TarIO.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/BdfFontFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageStat.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageColor.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ContainerIO.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/_version.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageQt.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageMath.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PaletteFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FontFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PdfParser.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ExifTags.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageCms.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageChops.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PSDraw.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageFilter.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageDraw2.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImagePath.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/init.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/JpegPresets.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/features.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageDraw.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageWin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageMorph.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/WalImageFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PcfFontFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageTk.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageOps.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageShow.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageEnhance.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageGrab.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/TiffTags.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/_util.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/GdImageFile.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImagePalette.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageTransform.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FitsImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageSequence.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PyAccess.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/_binary.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/Image.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/main.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/ImageFont.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-12.4-arm64-3.11/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing requirements to src/Pillow.egg-info/requires.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file ‘src/Pillow.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching ‘.c’
warning: no files found matching ‘
.h’
warning: no files found matching ‘.sh’
warning: no files found matching ‘
.txt’
warning: no previously-included files found matching ‘.appveyor.yml’
warning: no previously-included files found matching ‘.clang-format’
warning: no previously-included files found matching ‘.coveragerc’
warning: no previously-included files found matching ‘.editorconfig’
warning: no previously-included files found matching ‘.readthedocs.yml’
warning: no previously-included files found matching ‘codecov.yml’
warning: no previously-included files matching ‘.git*’ found anywhere in distribution
warning: no previously-included files matching ‘.pyc’ found anywhere in distribution
warning: no previously-included files matching ‘
.so’ found anywhere in distribution
no previously-included directories found matching ‘.ci’
adding license file ‘LICENSE’
writing manifest file ‘src/Pillow.egg-info/SOURCES.txt’
running build_ext

  The headers or library files could not be found for jpeg,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
  
  Traceback (most recent call last):
    File "/private/var/folders/_6/3ksx9tjs5bg4vpm2jxkjnzrh0000gn/T/pip-install-t9mtx9_f/pillow_4aed4763f2c8457ab91cd6c5e20ecbd3/setup.py", line 989, in <module>
      setup(
      ^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/core.py", line 148, in setup
      dist.run_commands()
      ^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
      ^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
      ^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/site-packages/setuptools/command/install.py", line 61, in run
      return orig.install.run(self)
             ^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/command/install.py", line 568, in run
      self.run_command('build')
      ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
      ^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
      ^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
      ^^^^^^^^^^^^^^^^^^^^
    File "/Users/ot/.pyenv/versions/3.11.0b1/lib/python3.11/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
      ^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/_6/3ksx9tjs5bg4vpm2jxkjnzrh0000gn/T/pip-install-t9mtx9_f/pillow_4aed4763f2c8457ab91cd6c5e20ecbd3/setup.py", line 802, in build_extensions
      if not getattr(feature, f) and feature.require(f):
                                     ^^^^^^^^^^^^^^^^^^
  RequiredDependencyException: jpeg
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/private/var/folders/_6/3ksx9tjs5bg4vpm2jxkjnzrh0000gn/T/pip-install-t9mtx9_f/pillow_4aed4763f2c8457ab91cd6c5e20ecbd3/setup.py", line 1009, in <module>
      raise RequiredDependencyException(msg)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  RequiredDependencyException:
  
  The headers or library files could not be found for jpeg,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
  
  
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pillow

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I am not a programmer so let me know if there is anyway to improve the issue report, I will update if required when I get time, thank you.

Понравилась статья? Поделить с друзьями:
  • Error led bus1f
  • Error keyring is not writable
  • Error keyframes not strictly monotonic increasing
  • Error keyboard при загрузке компьютера
  • Error key does not exist