pypa / packaging-problems

An issue tracker for the problems in packaging
151 stars 34 forks source link

ERROR: Can not execute `setup.py` since setuptools is not available in the build environment. #573

Closed IanVictorSXA closed 1 year ago

IanVictorSXA commented 2 years ago

Problem description

Hi, I am new to python and I am trying to install the email package, but it says "setuptools is not available in the build environment." I tried everything I could find on google and nothing works. I tried to install another package on another computer and it outputted the same error. Everything is up to date. Easy_install does not work. I am using the latest version of python and I am using Windows PowerShell.

Does anyone know what I need to do?

Thanks in advance.

Screenshot 2022-02-10 at 22-01-45 Untitled document - Google Docs

layday commented 2 years ago

email is a stdlib package. You should not install it with pip.

nandre7 commented 2 years ago

I have the same problem with another package : transcribe_anything

transcribe_anything % pip install transcribe-anything Collecting transcribe-anything Using cached transcribe_anything-1.2.4-py2.py3-none-any.whl (10 kB) Collecting pydeepspeech Using cached pydeepspeech-1.1.3-py2.py3-none-any.whl (10 kB) Collecting static-ffmpeg Using cached static_ffmpeg-2.0.8-py2.py3-none-any.whl (5.8 kB) Collecting capturing-process Using cached capturing_process-1.0.7-py2.py3-none-any.whl (4.9 kB) Collecting youtube-dl Using cached youtube_dl-2021.12.17-py2.py3-none-any.whl (1.9 MB) Collecting requests Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB) Collecting pathlib Using cached pathlib-1.0.1.tar.gz (49 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] ERROR: Can not execute setup.py since setuptools is not available in the build environment. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

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

honai commented 2 years ago

I had the same problem with other package: configobj .

After I installed some OS package deps and re-installing python, it worked for me.

$ sudo apt-get update; sudo apt-get install make build-essential libssl-dev zlib1g-dev \
  libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
  libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
$ (...then re-install python.)

Ref: https://github.com/pyenv/pyenv/wiki#suggested-build-environment

bilol-makhmudov commented 2 years ago

I am also having the same issue with the same "email library". Everything is updated, please, let me know if you will find the solution or alternative libraries that can be used to predict emails

henryiii commented 2 years ago

Email is built into Python. You can’t install it, you get the multi-year old initial implementation before it was added to the stdlib.

jonardcaguioa commented 2 years ago

you can also replicate the error if you enter this "pip install undetected-chromedriver". Did someone already managed to solve this issue?

layday commented 2 years ago

Please open an issue on the pip repo with steps to reproduce.

vishal-bhanawase commented 2 years ago

Facing similar issue while installing mariadb on sles15 pip3.9 install mariadb Collecting mariadb Using cached mariadb-1.0.10.zip (85 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] ERROR: Can not execute setup.py since setuptools is not available in the build environment. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

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

merwok commented 2 years ago

Is it really an issue with the mariadb package? The repo (https://github.com/mariadb-corporation/mariadb-connector-python) has setup.py but not pyproject.toml, so shouldn’t pip build in a legacy env with setuptools?

layday commented 2 years ago

pip won't install setuptools for you without a pyproject.toml. It looks like you don't have setuptools.

henryiii commented 2 years ago

(This is one of the things pyproject.toml was developed to fix!) Anyway, pre-install setuptools and wheel, and then complain to Mariadb-connector-python that they don't have a pyproject.toml. ;)

rishabbahal9 commented 2 years ago

I had way around but not proper solution. Check for 3 things: $ python --version $ pip --version $ easy_install --version For me python and pip version were for python3.7.9 but easy_install version told me that my setuptools was for python 2.7. And when I installed setuptools for python3, it tells me it is already installed.

So, I simply upgraded the version of python from 3.7.9 to 3.9.4 (Find a python version where python, pip and easy_install version matches) Rechecked python, pip and easy_install versions. They all were for python3 now.

I again ran pip install -r requirements.txt It worked!!!

[I had some problems with cryptography and Pillow in my requirements.txt, but I simply removed specified versions instead of Pillow==2.2.7 to Pillow and also make sure pip is up to date. It all worked.]

mike386 commented 2 years ago

In my case, Python was installed via pyenv, and SOME packages failed to install. After re-installing Python via pyenv install -vv and inspecting the log, turned out _ctypes failed to build because of missing libffi-dev system package. Installing libffi-dev and re-building Python via pyenv fixed the problem.

silvtal commented 2 years ago

I had way around but not proper solution. Check for 3 things: $ python --version $ pip --version $ easy_install --version For me python and pip version were for python3.7.9 but easy_install version told me that my setuptools was for python 2.7. And when I installed setuptools for python3, it tells me it is already installed.

Thanks for the tip!! I had the same situation and did the following:

python2.7 -m pip uninstall setuptools #remove the version for python2.7
pip install setuptools # install the python3.7 version

This time it installed the 60.9.3 version of setuptools. Thank you so much!

matthewfeickert commented 2 years ago

@rishabbahal9 @silvtal It sounds like you both might benefit from reading through Brett Cannon's Why you should use python -m pip blog post as it seems that you're running into situations where the pip that is getting called at the command line is not the one you think is being used.

(Apologies to the PyPA maintainers for adding more comments onto this already long Issue.)

rumezaa commented 2 years ago

can someone please give me the full solution - been stuck for way too long

merwok commented 2 years ago

You have to install setuptools, or add it to pyproject.toml in the build section.

rumezaa commented 2 years ago

how would you do that? (sorry I'm a complete beginner)

merwok commented 2 years ago

A closed, unrelated ticket is not the right place to get support. Please see https://setuptools.pypa.io/en/latest/userguide/quickstart.html and https://discuss.python.org/c/packaging/14

pradyunsg commented 2 years ago

If you're seeing this error, you likely need to install setuptools -- usually as pip install setuptools or python -m pip install setuptools.

saadazizgc commented 2 years ago

python --version = 3.9.4 pip --version = 3.9.4 easy_install --version = setuptools 41.0.1 from /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (Python 2.7)

When I run pip install setuptools and python -m pip install setuptools, I get: Requirement already satisfied: setuptools in /Users//.pyenv/versions/3.9.4/lib/python3.9/site-packages (60.9.3)

How do I change the path for setuptools to point to my pyenv installation?

layday commented 2 years ago

It already does. What problem are you experiencing?

saadazizgc commented 2 years ago

The easy_install version points to Python 2.7 though.

When I try to install the 50+ dependencies in my requirements.txt file, I get the following:

Running setup.py install for PyGObject ... error
  error: subprocess-exited-with-error

  × Running setup.py install for PyGObject did not run successfully.
  │ exit code: 1
  ╰─> [45 lines of output]
      running install
      /Users/<username>/.pyenv/versions/3.9.4/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-12.2-arm64-3.9
      creating build/lib.macosx-12.2-arm64-3.9/pygtkcompat
      copying pygtkcompat/pygtkcompat.py -> build/lib.macosx-12.2-arm64-3.9/pygtkcompat
      copying pygtkcompat/__init__.py -> build/lib.macosx-12.2-arm64-3.9/pygtkcompat
      copying pygtkcompat/generictreemodel.py -> build/lib.macosx-12.2-arm64-3.9/pygtkcompat
      creating build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_signalhelper.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_constants.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/pygtkcompat.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_ossighelper.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/importer.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_error.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_gtktemplate.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_propertyhelper.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/__init__.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/types.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/docstring.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_option.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/module.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_compat.py -> build/lib.macosx-12.2-arm64-3.9/gi
      creating build/lib.macosx-12.2-arm64-3.9/gi/repository
      copying gi/repository/__init__.py -> build/lib.macosx-12.2-arm64-3.9/gi/repository
      creating build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/GIMarshallingTests.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/Gdk.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/Pango.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/GdkPixbuf.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/Gtk.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/__init__.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/GLib.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/GObject.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/Gio.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/keysyms.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      running build_ext
      Package gobject-introspection-1.0 was not found in the pkg-config search path.
      Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'gobject-introspection-1.0' found
      Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.46.0')' returned non-zero exit status 1.
      [end of output]

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

My python, pip and setuptools versions are above I have ARM64 M1 mac

layday commented 2 years ago

Modern versions of setuptools don't have easy_install. Your easy_install is from the Python 2 installation which comes with macOS.

The issue you are experiencing is unrelated to setuptools - you are missing gobject-introspection-1.0 which is required to build a wheel of PyGObject.

saadazizgc commented 2 years ago

I ran brew install gobject-introspection

I get this error now:

error: subprocess-exited-with-error

  × Running setup.py install for PyGObject did not run successfully.
  │ exit code: 1
  ╰─> [1231 lines of output]
  .
  .
  .
10 warnings and 2 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [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.
╰─> PyGObject
merwok commented 2 years ago

You need to get the full error message to see what development packages need to be installed with the system package manager. This is not the same thing as what’s discussed in this ticket though.

saadazizgc commented 2 years ago

Yeah I think you are right,

This is an issue with a single version of PyGObject (3.30.4).

When I run pip install PyGObject==3.30.4, I get a very long error msg:

Building wheels for collected packages: PyGObject
  Building wheel for PyGObject (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [1229 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-12.2-arm64-3.9
      creating build/lib.macosx-12.2-arm64-3.9/pygtkcompat
      copying pygtkcompat/pygtkcompat.py -> build/lib.macosx-12.2-arm64-3.9/pygtkcompat
      copying pygtkcompat/__init__.py -> build/lib.macosx-12.2-arm64-3.9/pygtkcompat
      copying pygtkcompat/generictreemodel.py -> build/lib.macosx-12.2-arm64-3.9/pygtkcompat
      creating build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_signalhelper.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_constants.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/pygtkcompat.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_ossighelper.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/importer.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_error.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_gtktemplate.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_propertyhelper.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/__init__.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/types.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/docstring.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_option.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/module.py -> build/lib.macosx-12.2-arm64-3.9/gi
      copying gi/_compat.py -> build/lib.macosx-12.2-arm64-3.9/gi
      creating build/lib.macosx-12.2-arm64-3.9/gi/repository
      copying gi/repository/__init__.py -> build/lib.macosx-12.2-arm64-3.9/gi/repository
      creating build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/GIMarshallingTests.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/Gdk.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/Pango.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/GdkPixbuf.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/Gtk.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/__init__.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/GLib.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/GObject.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/Gio.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      copying gi/overrides/keysyms.py -> build/lib.macosx-12.2-arm64-3.9/gi/overrides
      running build_ext
      pycairo: new API
      pycairo: trying include directory: '/Users/saadaziz/.pyenv/versions/3.9.4/lib/python3.9/site-packages/cairo/include'
      pycairo: found '/Users/saadaziz/.pyenv/versions/3.9.4/lib/python3.9/site-packages/cairo/include/py3cairo.h'
      building 'gi._gi' extension
      creating build/temp.macosx-12.2-arm64-3.9
      creating build/temp.macosx-12.2-arm64-3.9/gi
      clang

....

gz_px677g2fv60whmr8bw0000gp/T/pip-install-e5iiu1ae/pygobject_2ff5851847654e04a91e9dca3ebd7126/gi/pygobject.h:160:40: warning: 'GParameter' is deprecated [-Wdeprecated-declarations]
                                             GParameter  *params,
                                             ^
      /opt/homebrew/Cellar/glib/2.70.4/include/glib-2.0/gobject/gparam.h:196:39: note: 'GParameter' has been explicitly marked deprecated here
      typedef struct _GParameter      GParameter GLIB_DEPRECATED_TYPE_IN_2_54;
                                                 ^
      /opt/homebrew/Cellar/glib/2.70.4/include/glib-2.0/glib/gversionmacros.h:830:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_54'
      # define GLIB_DEPRECATED_TYPE_IN_2_54           GLIB_DEPRECATED_TYPE
                                                      ^
      /opt/homebrew/Cellar/glib/2.70.4/include/glib-2.0/glib/gmacros.h:1179:30: note: expanded from macro 'GLIB_DEPRECATED_TYPE'
      #define GLIB_DEPRECATED_TYPE G_DEPRECATED
                                   ^
      /opt/homebrew/Cellar/glib/2.70.4/include/glib-2.0/glib/gmacros.h:1102:37: note: expanded from macro 'G_DEPRECATED'
      #define G_DEPRECATED __attribute__((__deprecated__))
                                          ^
....
 #define G_DEPRECATED __attribute__((__deprecated__))
                                          ^
      10 warnings and 2 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
anthonymichaelclark commented 2 years ago

@merwok I'm encountering this error when the issue seems to be that I have both a pyproject.toml and a setup.py in the directory I'm trying to install from. Eg:

(transunion_features) anthonyclark@MacBook-Pro transunion_features % python -m pip install -e ../ds-framework
...
<output>
...
Installing collected packages: ds-framework
  Running setup.py develop for ds-framework
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [1 lines of output]
        ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
        [end of output]

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

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
    ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
    [end of output]

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

This command runs successfully after removing pyproject.toml from the target directory.

I assume this isn't a bug, but the error message does seem pretty hard to connect to the underlying issue.

henryiii commented 2 years ago

If you have a pyproject.toml, it needs to have the following in it:

[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"

See https://packaging.python.org/en/latest/tutorials/packaging-projects/ and/or https://scikit-hep.org/developer/packaging.

sabbaghAtKait commented 2 years ago

I am getting the same message when trying to install pip install pathlib==1.0.1

Here is the console output

Collecting pathlib==1.0.1
  Using cached pathlib-1.0.1.tar.gz (49 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

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

OS: macOS Monterey OS version: 12.3 Chip: M1 Python: Python 3.10.2 pip: pip 22.0.4 from /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip (python 3.10)

abravalheri commented 2 years ago

Hi @sabbaghAtKait please have a look on https://github.com/pypa/packaging-problems/issues/573#issuecomment-1065144688.

But also note that the pathlib package on PyPI is essentially broken[^1]. According to their front page:

Attention: this backport module isn’t maintained anymore. If you want to report issues or contribute patches, please consider the pathlib2 project instead.

pathlib is part of the standard library since Python 3.4. You don't need to install it to use.

[^1]: It will break your Python installation/environment because its API is not compatible with the API most packages are expecting to be available.

MiguelGuzmanDev commented 2 years ago

If you're seeing this error, you likely need to install setuptools -- usually as pip install setuptools or python -m pip install setuptools.

Esto me ayudo mil gracias!!!

sandeepyadav1478 commented 2 years ago

Basically, Its package fault. Coz its was designed, build on old python versions. This is Simplest answer. ;-)

Ahmed-Ayman commented 2 years ago

Thank you @saadazizgc MacOS Monterey here and was trying to install ansible, issue was fixed by running brew install gobject-introspection

lygstate commented 2 years ago
ollecting MarkupSafe>=0.9.2
  Downloading MarkupSafe-2.1.1.tar.gz (18 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

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

Upgrade setuptools fixed this

Isha307 commented 2 years ago

I have tried everything but nothing works. Finally I downloaded the packages from https://www.lfd.uci.edu/~gohlke/pythonlibs/ and installed it using pip install packages and it worked for me.

esk33 commented 2 years ago

I ran into this problem recently trying to pip install nextcord, and upgrading setuptools with pip install --upgrade setuptools fixed the issue.

akanimax commented 2 years ago

Indeed, just installing/upgrading setuptools fixed the issue for me :smile:! Cheers :beers:!

aquadrehz commented 2 years ago

I ran into this problem recently trying to pip install nextcord, and upgrading setuptools with pip install --upgrade setuptools fixed the issue.

This is work for me too. Some Python packages is not pre-install with last version of setuptools

AhmTaher commented 2 years ago

Thank you

judeleonard commented 2 years ago

For those experiencing this problem while trying to install email library. I discovered it's a standard library for python3, not so sure for python2. So you can just go ahead and import the package into your environment instead of trying to install it.

merwok commented 2 years ago

As was said before, email is in the standard library for all versions, it should not be in requirements.

abdulrehmankpr58 commented 1 year ago

Collecting cyhunspell Using cached CyHunspell-1.3.4.tar.gz (2.7 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: cacheman>=2.0.6 in c:\users\abdul rehman\appdata\local\programs\python\python310\lib\site-packages (from cyhunspell) (2.0.8) Requirement already satisfied: future>=0.16.0 in c:\users\abdul rehman\appdata\local\programs\python\python310\lib\site-packages (from cacheman>=2.0.6->cyhunspell) (0.18.2) Requirement already satisfied: psutil>=2.1.0 in c:\users\abdul rehman\appdata\roaming\python\python310\site-packages (from cacheman>=2.0.6->cyhunspell) (5.9.4) Requirement already satisfied: six>=1.10.0 in c:\users\abdul rehman\appdata\roaming\python\python310\site-packages (from cacheman>=2.0.6->cyhunspell) (1.16.0) Building wheels for collected packages: cyhunspell Building wheel for cyhunspell (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [40 lines of output] C:\Users\Abdul Rehman\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\hunspell copying hunspell\platform.py -> build\lib.win-amd64-cpython-310\hunspell copying hunspell__init__.py -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\hunspell.pxd -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\thread.pxd -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\hunspell.pyx -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\hunspell.cpython-36m-x86_64-linux-gnu.so -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\thread.hpp -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\hunspell.cpp -> build\lib.win-amd64-cpython-310\hunspell creating build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_AU.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_CA.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_GB.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_NZ.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_US.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_ZA.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\test.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_AU.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_CA.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_GB.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_NZ.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_US.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_ZA.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\test.dic -> build\lib.win-amd64-cpython-310\dictionaries creating build\lib.win-amd64-cpython-310\libs creating build\lib.win-amd64-cpython-310\libs\msvc copying libs\msvc\libhunspell-msvc11-x64.lib -> build\lib.win-amd64-cpython-310\libs\msvc copying libs\msvc\libhunspell-msvc11-x86.lib -> build\lib.win-amd64-cpython-310\libs\msvc copying libs\msvc\libhunspell-msvc14-x64.lib -> build\lib.win-amd64-cpython-310\libs\msvc copying libs\msvc\libhunspell-msvc14-x86.lib -> build\lib.win-amd64-cpython-310\libs\msvc running build_ext building 'hunspell.hunspell' 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: Failed building wheel for cyhunspell Running setup.py clean for cyhunspell Failed to build cyhunspell Installing collected packages: cyhunspell Running setup.py install for cyhunspell ... error error: subprocess-exited-with-error

× Running setup.py install for cyhunspell did not run successfully. │ exit code: 1 ╰─> [42 lines of output] C:\Users\Abdul Rehman\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running install C:\Users\Abdul Rehman\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\hunspell copying hunspell\platform.py -> build\lib.win-amd64-cpython-310\hunspell copying hunspell__init__.py -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\hunspell.pxd -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\thread.pxd -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\hunspell.pyx -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\hunspell.cpython-36m-x86_64-linux-gnu.so -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\thread.hpp -> build\lib.win-amd64-cpython-310\hunspell copying hunspell\hunspell.cpp -> build\lib.win-amd64-cpython-310\hunspell creating build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_AU.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_CA.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_GB.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_NZ.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_US.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_ZA.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\test.aff -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_AU.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_CA.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_GB.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_NZ.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_US.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\en_ZA.dic -> build\lib.win-amd64-cpython-310\dictionaries copying dictionaries\test.dic -> build\lib.win-amd64-cpython-310\dictionaries creating build\lib.win-amd64-cpython-310\libs creating build\lib.win-amd64-cpython-310\libs\msvc copying libs\msvc\libhunspell-msvc11-x64.lib -> build\lib.win-amd64-cpython-310\libs\msvc copying libs\msvc\libhunspell-msvc11-x86.lib -> build\lib.win-amd64-cpython-310\libs\msvc copying libs\msvc\libhunspell-msvc14-x64.lib -> build\lib.win-amd64-cpython-310\libs\msvc copying libs\msvc\libhunspell-msvc14-x86.lib -> build\lib.win-amd64-cpython-310\libs\msvc running build_ext building 'hunspell.hunspell' 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. ╰─> cyhunspell

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

Paul-Mick commented 1 year ago

I had the same issue while installing PyInstaller with pip3.10.

My solution: uninstall and reinstall setuptools with pip pip uninstall setuptools pip install setuptools

J0J0HA commented 1 year ago

I had the same issue while installing PyInstaller with pip3.10.

My solution: uninstall and reinstall setuptools with pip pip uninstall setuptools pip install setuptools

I (Windows) needed to run pip uninstall setuptools two times as it was installed once in appdata and once in program files.

giu-ferreira-cientista commented 1 year ago

pip install --upgrade setuptools fixed the issue for me too!

Waistperfection commented 1 year ago

try to update setuptools from pip!!!!

mummy29 commented 1 year ago

email is Python’s package,not need install image

mummy29 commented 1 year ago

upgrade pip is useless

merwok commented 1 year ago

Can an admin close this ticket? The answer was given at least three times, and a couple unrelated issues have been mixed in.