Subprocess exited with error pip install

Description Starting with pip 22.1, including "pip" in the pyproject.toml [build-system] requires fails. Example pyproject.toml: [build-system] requires = [ "setuptools>=40.8.0&qu...

Description

Starting with pip 22.1, including «pip» in the pyproject.toml [build-system] requires fails.

Example pyproject.toml:

[build-system]
requires = [
    "setuptools>=40.8.0", 
    "wheel",
    "pip"
]
build-backend = "setuptools.build_meta"

Error:

(venv) D:DevmyPyPackage>python -m pip install D:DevmyPyPackage
Looking in indexes: https://pypi.org/simple
Processing d:devmypypackage
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Looking in indexes: https://pypi.org/simple
      Collecting setuptools>=40.8.0
        Using cached setuptools-62.2.0-py3-none-any.whl (1.1 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Collecting pip
        Using cached pip-22.1-py3-none-any.whl (2.1 MB)
      ERROR: To modify pip, please run the following command:
      D:DevmyPyPackagevenvScriptspython.exe -m pip install --ignore-installed --no-user --prefix C:UserscowlinatorAppDataLocalTemppip-build-env-upw4u049overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org -- setuptools>=40.8.0 wheel pip
      [end of output]

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

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

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

Verified that this succeeds with pip 22.0.4

This error message repeatedly states that this is likely not a problem with pip… but it is the change from pip 22.0.4 to 22.1 that breaks it.

Expected behavior

I expect pip 22.1 to behave the same as pip 22.0.4; namely, that the installation succeeds.

Output when using pip 22.0.4:

(venv) D:DevmyPyPackage>python -m pip install D:DevmyPyPackage
Looking in indexes: https://pypi.org/simple
Processing d:devmypypackage
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: hi
  Building wheel for hi (pyproject.toml) ... done
  Created wheel for hi: filename=hi-0.0.0-py3-none-any.whl size=1048 sha256=b5e4d2b574164c3e8c93ea425bd63f58876eb58087dedd259755a9326ddc84fd
  Stored in directory: C:UserscowlinatorAppDataLocalTemppip-ephem-wheel-cache-u03_8ou9wheels6a647bc6556dc063c160509a71a3f427d795bea205706ceccf1319ff
Successfully built hi
Installing collected packages: hi
Successfully installed hi-0.0.0
WARNING: You are using pip version 22.0.4; however, version 22.1 is available.
You should consider upgrading via the 'D:DevmyPyPackagevenvScriptspython.exe -m pip install --upgrade pip' command.

pip version

22.1

Python version

3.7.9

OS

Windows 11 (21H2)

How to Reproduce

  1. Create a virtual environment and activate it
  2. Install pip 22.1
  3. Create a python package with a pyproject.toml containing:
[build-system]
requires = [
    "setuptools>=40.8.0", 
    "wheel",
    "pip"
]
build-backend = "setuptools.build_meta"
  1. Install this python package from the local directory with python -m pip install <dir>
  2. Observe the error

Output

D:DevmyPyPackage>python -m venv venv && venvScriptsactivate

(venv) D:DevmyPyPackage>python -m pip install --upgrade pip
Looking in indexes: https://pypi.org/simple
Collecting pip
  Using cached pip-22.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.1.1
    Uninstalling pip-20.1.1:
      Successfully uninstalled pip-20.1.1
Successfully installed pip-22.1

(venv) D:DevmyPyPackage>python -m pip install D:DevmyPyPackage
Looking in indexes: https://pypi.org/simple
Processing d:devmypypackage
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Looking in indexes: https://pypi.org/simple
      Collecting setuptools>=40.8.0
        Using cached setuptools-62.2.0-py3-none-any.whl (1.1 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Collecting pip
        Using cached pip-22.1-py3-none-any.whl (2.1 MB)
      ERROR: To modify pip, please run the following command:
      D:DevmyPyPackagevenvScriptspython.exe -m pip install --ignore-installed --no-user --prefix C:UserscowlinatorAppDataLocalTemppip-build-env-upw4u049overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org -- setuptools>=40.8.0 wheel pip
      [end of output]

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

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

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

Code of Conduct

  • I agree to follow the PSF Code of Conduct.

Содержание

  1. Subprocess exited with error pip
  2. Check if your Python version is supported by the package #
  3. Create a virtual environment #
  4. Try running pip install in verbose mode #
  5. Conclusion #
  6. Pip 22.1 (only) fails when included in pyproject.toml #11120
  7. Comments
  8. Description
  9. Expected behavior
  10. pip version
  11. Python version
  12. How to Reproduce
  13. Output
  14. Code of Conduct
  15. Can’t install #433
  16. Comments
  17. I am trying to install the package but pip keeps failing. The error I get is this:
  18. Ошибка подпроцесса при установке Kivy на Windows. Что делать?

Subprocess exited with error pip

The —use-deprecated option allows us to use the old resolver behavior when installing modules.

If the suggestions didn’t help, read toward the end of your error message.

It might contain information such as: «RuntimeError: Cannot install on Python version 3.11.0; only versions >=3.7, pip install the package from the error message before installing the other package.

Another common cause of the error is misspelling the name of the package and trying to install some broken, obsolete module by mistake.

Check if your Python version is supported by the package #

The error «note: This error originates from a subprocess, and is likely not a problem with pip» is sometimes caused when the package you are trying to install doesn’t have available wheels for your version of Python.

You can check your Python version with the python —version command.

You can check if a package has wheels available for a specific Python version in the Download files section of the package’s pypi page.

If the .whl files are not available for your version of Python, you can download an older version.

The —pre option makes it so pip includes pre-release and development versions of the package. By default pip only finds stable versions.

If that didn’t work, you can download a specific Python version that is supported by the package if the package doesn’t support the latest Python version.

Different versions are available in the «Looking for a specific release» table.

Make sure to tick the following options if you get prompted:

  • Install launcher for all users (recommended)
  • Add Python to PATH (this adds Python to your PATH environment variable)

If that didn’t help and you don’t already have a virtual environment, try creating one.

Create a virtual environment #

To solve the «note: This error originates from a subprocess, and is likely not a problem with pip» error:

  1. Create a virtual environment.
  2. Activate the virtual environment.
  3. Run the pip install command with the virtual environment active.

Make sure to use the correct command to activate your virtual environment depending on your operating system and your shell.

Your virtual environment will use the version of Python that was used to create it.

Try running pip install in verbose mode #

If none of the suggestions helped, try running the pip install command in verbose mode.

The -v option stands for verbose mode and can be used up to 3 times.

When the pip install command is run in verbose mode, the command shows more output and how the error occurred.

Conclusion #

To solve the error «note: This error originates from a subprocess, and is likely not a problem with pip»:

  1. Upgrade your versions of pip , setuptools and wheel .
  2. Make sure you haven’t got any missing dependencies.
  3. Make sure your Python version is supported by the package.

Источник

Pip 22.1 (only) fails when included in pyproject.toml #11120

Description

Starting with pip 22.1, including «pip» in the pyproject.toml [build-system] requires fails.

Verified that this succeeds with pip 22.0.4

This error message repeatedly states that this is likely not a problem with pip. but it is the change from pip 22.0.4 to 22.1 that breaks it.

Expected behavior

I expect pip 22.1 to behave the same as pip 22.0.4; namely, that the installation succeeds.

Output when using pip 22.0.4:

pip version

Python version

Windows 11 (21H2)

How to Reproduce

  1. Create a virtual environment and activate it
  2. Install pip 22.1
  3. Create a python package with a pyproject.toml containing:
  1. Install this python package from the local directory with python -m pip install
  2. Observe the error

Output

Code of Conduct

The text was updated successfully, but these errors were encountered:

You shouldn’t have pip in build-requires in the first place — why do you think you need it there?

The reason it’s failing is a somewhat complex combination of the fact that pip is already in the build environment to install everything else, pip can’t upgrade itself on Windows unless it’s invoked via python -m pip , and when setting up the build environment it looks like we invoke pip rather than python -m pip . It’s probably fixable, but messy to do so.

I don’t think this is worth fixing because you shouldn’t have pip in build-requires in the first place.

This might be something that we could prevent — I don’t have a Windows machine to be able to see why/what is happening. What’s happening here is that the environment is basically triggering the logic meant to protect users from a broken pip installation on Windows (see #1299).

It’s unclear to me why that’s happening, but we might have a spot where code needs to change from pip . to sys.executable -m pip . in the codebase — or some edge case that needs to be accounted for?

If someone is able to reproduce this, please plug a debugger into pip and share the values in the locals() and sys.argv[0] at:

modifying_pip and WINDOWS and os . path . basename ( sys . argv [ 0 ]) in pip_names

This error message repeatedly states that this is likely not a problem with pip.

Yea, this happening in a build step, where the typical failure is things like the package not having the appropriate build-time dependencies installed. The use of the word likely points toward that. 🙂

@pradyunsg this is indeed probably the solution, although we may be invoking the build environment’s pip at this point, so sys.executable might be the wrong thing to use.

As I say, it’s possible, but tricky, and I’d like to know why the OP wants to include pip in build-system.requires before we «fix» this.

Bah, you’re right — I missed that nuance. 🙂

You shouldn’t have pip in build-requires in the first place — why do you think you need it there?

. I had no reason to think it didn’t need to be there? It needs setuptools and wheel to be there. Why do those need to be there and not pip? The documentation states that build-system.requires is a list of requirement specifiers for build-time dependencies of a package. It seems like pip is a build-time dependency of my package. I don’t see how it can pip install if the user doesn’t even have pip.

If no pyproject.toml should ever have pip in build-system.requires , then the documentation does not make this clear.

If no pyproject.toml should ever have pip in build-system.requires, then the documentation does not make this clear.

build-system.requires is intended to be «the things you need in the environment order to build the project». It’s the front end’s responsibility to install those items into the environment and to call the build_wheel hook of the backend in that environment. That build frontend might be pip or it might be something else. But it doesn’t need to be in the environment because it orchestrates the creation and use of that environment.

I don’t think it ever occurred to me that people might think pip needed to be added into the build environment. If you were building a wheel using build would you expect to put build in there? How can you know what frontend the user is invoking? But if you have a suggestion for improving the documentation, that would be great! I guess the first question is which documentation you’d want to improve — this stuff is generally covered in packaging.python.org, not in pip’s documentation, so a PR there might be the best approach.

This is covered in pip’s documentation, as part of https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-time-dependencies, which might be the sentence that is the source of the confusion here.

Is this still happening in 22.1.1?

. I had no reason to think it didn’t need to be there? It needs setuptools and wheel to be there

Why does wheel need to be there? Setuptools lists it as a dependency for building wheels and is automatically installed when necessary.

It used to not do that, in earlier versions of setuptools.

Источник

Can’t install #433

I am trying to install the package but pip keeps failing. The error I get is this:

Collecting PyBluez
Using cached PyBluez-0.23.tar.gz (97 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 in PyBluez setup command: use_2to3 is invalid.
[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.

The text was updated successfully, but these errors were encountered:

— a caller that pip uses to run setup.py # # — It imports setuptools before invoking setup.py, to enable projects that directly # import from `distutils.core` to work with newer packaging standards. # — It provides a clear error message when setuptools is not installed. # — It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so # setuptools doesn’»‘»‘t think the script is `-c`. This avoids the following warning: # manifest_maker: standard file ‘»‘»‘-c’»‘»‘ not found». # — It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize try: import setuptools except ImportError as error: print( «ERROR: Can not execute `setup.py` since setuptools is not available in » «the build environment.», file=sys.stderr, ) sys.exit(1) __file__ = %r sys.argv[0] = __file__ if os.path.exists(__file__): filename = __file__ with tokenize.open(__file__) as f: setup_py_code = f.read() else: filename = «» setup_py_code = «from setuptools import setup; setup()» exec(compile(setup_py_code, filename, «exec»)) ‘»‘»»»‘»»»‘»‘ % (‘»‘»‘/tmp/pip-install-68qwtmvz/pybluez_c1c9b215cbe7493a9f160507e1e4e9c2/setup.py’»‘»‘,), «

«, «exec»))’ egg_info —egg-base /tmp/pip-pip-egg-info-ew_2egyz cwd: /tmp/pip-install-68qwtmvz/pybluez_c1c9b215cbe7493a9f160507e1e4e9c2/ Preparing metadata (setup.py) . error 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. «>

Related issues (did not check them for solutions yet):
#413 #424 #431

This was fixed in #431 — Solution for now, until a new release is pushed to pypi is:

Источник

Ошибка подпроцесса при установке Kivy на Windows. Что делать?

Я пытался установить Kivy через pip по инструкции с официального сайта, однако, при попытке установки консоль выдаёт следующую ошибку:

Если это важно, у меня стоит python 3.10.

Как решить данную проблему?

  • Вопрос задан 06 февр. 2022
  • 3479 просмотров

Потихонечку откатываемся на python 3.8

Также, если есть желание, перед установкой любой библиотеки, желательно почитать офф. инструкцию по установке:
Kivy 2.0.0 officially supports Python versions 3.6 — 3.9. — второе предложение в инструкции!

Потихонечку откатываемся на python 3.8

А если серьёзно, у вас он работает с 3.9?

3.7, 3.8, 3.9 — тут вообще без разницы, абсолютно.

Тем более, последние версии не опытным пользователям привозят только вагон и маленькую тележку проблем.

Если без разницы, тогда почему 3.8?

Какие проблемы привозит 3.9 в отличие от 3.8?

Как вариант, меньшее количество пакетов, доступных через pip install. Конечно, можно большинство пакетов в Python 3.9, 3.10. установить из исходников, но новички этим заниматься не будут!

Источник

While Installing the New PIP package I am Facing the following error? You are facing the same error too? Then You are at the right place we are going to discuss this error What is This error Occurring and What is the possible solution in order to solve this error.

Contents

  1. What is note: This error originates from a subprocess, and is likely not a problem with pip Error?
  2. How To Fix note: This error originates from a subprocess, and is likely not a problem with pip Error?
  3. Answer 1: Downgrade PIP version
  4. Final Word
    • Also, Look at this solvderror

While Installing the New PIP package I am Facing the following error:

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

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

How To Fix note: This error originates from a subprocess, and is likely not a problem with pip Error?

How To Fix note: This error originates from a subprocess, and is likely not a problem with pip Error?

To Fix note: This error originates from a subprocess, and is likely not a problem with pip Error You need to downgrade the PIP version and That will resolve this issue. The problem is with the Latest version with PIP I think that’s why this error occurs. Just run this command in your terminal and your error will be fixed: pip install pip==21.3.1 You can see here all PIP versions are listed out there any try one By one If You don’t want to use 21.3.1. And By downgrading pip your error will be fixed.

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

To Fix note: This error originates from a subprocess, and is likely not a problem with pip Error You need to downgrade the PIP version and That will resolve this issue. The problem is with the Latest version with PIP I think that’s why this error occurs. Just run this command in your terminal and your error will be fixed: pip install pip==21.3.1 You can see here all PIP versions are listed out there any try one By one If You don’t want to use 21.3.1. And By downgrading pip your error will be fixed.

Answer 1: Downgrade PIP version

You need to downgrade the PIP version and That will resolve this issue. The problem is with the Latest version with PIP I think that’s why this error occurs. Just run this command in your terminal and your error will be fixed.

pip install pip==21.3.1

You can see here all PIP versions are listed out there any try one By one If You don’t want to use 21.3.1. And By downgrading pip your error will be fixed.

Final Word

So This is All About this error You Just need to Use an Older version of PIP and your error will be solved. Hope This Above Answer May helped to solve your warning. Comment Below which answer worked For You. Thank You.

Also, Look at this solvderror

  • selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
  • PermissionError: [Errno 13] Permission denied
  • WARNING: There was an error checking the latest version of pip Ignoring invalid distribution -ip
  • ‘Conda’ is not recognized as internal or external command
  • How to submit form data in post request using Axios?

Здравствуйте форумчане!
Первый раз с таким сталкиваюсь.
Пробовал переустанавливать python не помогло.
Полный текст ошибки из консоли:
(pythonparse) PS C:gitgit_practice> pip install lxml
Collecting lxml
Downloading lxml-4.9.1.tar.gz (3.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 2.0 MB/s eta 0:00:00
Preparing metadata (setup.py) … done
Installing collected packages: lxml
DEPRECATION: lxml is being installed using the legacy ‘setup.py install’ method, because it does not have a ‘pyproject.toml’ and the ‘wheel’ package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the ‘—use-pep517’ option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for lxml … error
error: subprocess-exited-with-error

× Running setup.py install for lxml did not run successfully.
│ exit code: 1
╰─> [76 lines of output]
Building lxml version 4.9.1.
Building without Cython.
Building against pre-built libxml2 andl libxslt libraries
running install
C:gitgit_practicepythonparseLibsite-packagessetuptoolscommandinstall.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 buildlib.win-amd64-cpython-311
creating buildlib.win-amd64-cpython-311lxml
copying srclxmlbuilder.py -> buildlib.win-amd64-cpython-311lxml
copying srclxmlcssselect.py -> buildlib.win-amd64-cpython-311lxml
copying srclxmldoctestcompare.py -> buildlib.win-amd64-cpython-311lxml
copying srclxmlElementInclude.py -> buildlib.win-amd64-cpython-311lxml
copying srclxmlpyclasslookup.py -> buildlib.win-amd64-cpython-311lxml
copying srclxmlsax.py -> buildlib.win-amd64-cpython-311lxml
copying srclxmlusedoctest.py -> buildlib.win-amd64-cpython-311lxml
copying srclxml_elementpath.py -> buildlib.win-amd64-cpython-311lxml
copying srclxml__init__.py -> buildlib.win-amd64-cpython-311lxml
creating buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludes__init__.py -> buildlib.win-amd64-cpython-311lxmlincludes
creating buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmlbuilder.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmlclean.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmldefs.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmldiff.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmlElementSoup.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmlformfill.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmlhtml5parser.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmlsoupparser.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtmlusedoctest.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtml_diffcommand.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtml_html5builder.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtml_setmixin.py -> buildlib.win-amd64-cpython-311lxmlhtml
copying srclxmlhtml__init__.py -> buildlib.win-amd64-cpython-311lxmlhtml
creating buildlib.win-amd64-cpython-311lxmlisoschematron
copying srclxmlisoschematron__init__.py -> buildlib.win-amd64-cpython-311lxmlisoschematron
copying srclxmletree.h -> buildlib.win-amd64-cpython-311lxml
copying srclxmletree_api.h -> buildlib.win-amd64-cpython-311lxml
copying srclxmllxml.etree.h -> buildlib.win-amd64-cpython-311lxml
copying srclxmllxml.etree_api.h -> buildlib.win-amd64-cpython-311lxml
copying srclxmlincludesc14n.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesconfig.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesdtdvalid.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesetreepublic.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludeshtmlparser.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesrelaxng.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesschematron.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludestree.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesuri.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesxinclude.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesxmlerror.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesxmlparser.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesxmlschema.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesxpath.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesxslt.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludes__init__.pxd -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludesetree_defs.h -> buildlib.win-amd64-cpython-311lxmlincludes
copying srclxmlincludeslxml-version.h -> buildlib.win-amd64-cpython-311lxmlincludes
creating buildlib.win-amd64-cpython-311lxmlisoschematronresources
creating buildlib.win-amd64-cpython-311lxmlisoschematronresourcesrng
copying srclxmlisoschematronresourcesrngiso-schematron.rng -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesrng
creating buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsl
copying srclxmlisoschematronresourcesxslRNG2Schtrn.xs l -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsl
copying srclxmlisoschematronresourcesxslXSD2Schtrn.xs l -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsl
creating buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_abstract_expand.xsl -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_dsdl_include.xsl -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_schematron_message.xsl -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_schematron_skeleton_for_xslt1.xsl -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1iso_svrl_for_xslt1.xsl -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsliso-schematron-xslt1
copying srclxmlisoschematronresourcesxsliso-schematron-xslt1readme.txt -> buildlib.win-amd64-cpython-311lxmlisoschematronresourcesxsliso-schematron-xslt1
running build_ext
building ‘lxml.etree’ extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with «Microsoft C++ Build Tools»: https://visualstudio.microsoft… ild-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.
╰─> lxml

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

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

Introduction

This article actually is another version of the other version available. That version is an article with the title of ‘How to Solve Error Message ERROR: Failed building wheel for psycopg2 when installing psycopg2 using pip command’ and it exist in this link. This article is just another version only with the different title. The other article is focusing on the error of ‘ERROR: Failed building wheel for psycopg2’. But this article, there is another general error of ‘error: subprocess-exited-with-error’. So, the following is part of the error :

Building wheel for psycopg2 (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
C:repositorydjangoenvlibpython3.9site-packagessetuptoolsconfigsetupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)

On the other hand, the following is the full length of the error message appear. The trigger is the installation of ‘psycopg2’ python library. Furthermore, the installation is using pip command in a device running using Microsoft Windows operating system :

(env) C:repositorydjangoenvbin>pip install psycopg2
Collecting psycopg2
Using cached psycopg2-2.9.3.tar.gz (380 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
C:repositorydjangoenvlibpython3.9site-packagessetuptoolsconfigsetupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running bdist_wheel
running build
running build_py
creating build
creating buildlib.mingw_x86_64-cpython-39
creating buildlib.mingw_x86_64-cpython-39psycopg2
copying liberrorcodes.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying liberrors.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libextensions.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libextras.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libpool.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libsql.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libtz.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying lib_ipaddress.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying lib_json.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying lib_range.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying lib__init__.py -> buildlib.mingw_x86_64-cpython-39psycopg2
running build_ext
building 'psycopg2._psycopg' extension
error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
[end of output]

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

× Running setup.py install for psycopg2 did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
C:repositorydjangoenvlibpython3.9site-packagessetuptoolsconfigsetupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running install
C:repositorydjangoenvlibpython3.9site-packagessetuptoolscommandinstall.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 buildlib.mingw_x86_64-cpython-39
creating buildlib.mingw_x86_64-cpython-39psycopg2
copying liberrorcodes.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying liberrors.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libextensions.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libextras.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libpool.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libsql.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying libtz.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying lib_ipaddress.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying lib_json.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying lib_range.py -> buildlib.mingw_x86_64-cpython-39psycopg2
copying lib__init__.py -> buildlib.mingw_x86_64-cpython-39psycopg2
running build_ext
building 'psycopg2._psycopg' extension
error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
[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.
╰─> psycopg2

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

(env) C:repositorydjangoenvbin>
(env) C:repositorydjangoenvbin>python -V
Python 3.9.10

(env) C:repositorydjangoenvbin>

So, the solution is actually the exact same solution for solving the problem exist in the other article. So, the following is actually the sequence for solving the problem which is actually just replacing the old python virtual environment with a new one. Additionally, that new python virtual environment has a different python version as its base. For the sequences, the following is the actual steps as the solution :

  1. First step, create the new python virtual environment. The process is not using ‘virtualenv env’ command. Instead, use another command to create the python virtual environment as follows :

    <pre>C:repositorydjango&gt;python -m venv venv
    
    C:repositorydjango&gt;cd venv
    
    (venv) C:repositorydjangovenv&gt;dir
    Volume in drive C is Windows-SSD
    Volume Serial Number is CA30-19A4
    
    Directory of C:repositorydjangovenv
    
    07/17/2022 03:08 PM &lt;DIR&gt; .
    07/17/2022 03:08 PM &lt;DIR&gt; ..
    07/17/2022 03:08 PM &lt;DIR&gt; Include
    07/17/2022 03:08 PM &lt;DIR&gt; Lib
    07/17/2022 03:08 PM 84 pyvenv.cfg
    07/17/2022 03:08 PM &lt;DIR&gt; Scripts
    1 File(s) 84 bytes
    5 Dir(s) 147,161,825,280 bytes free
    
    C:repositorydjangovenv&gt;
    
  2. Following after, just access the ‘Scripts’ folder as follows :

    C:repositorydjangovenv&gt;cd Scripts
    
    C:repositorydjangovenvScripts&gt;dir
    Volume in drive C is Windows-SSD
    Volume Serial Number is CA30-19A4
    
    Directory of C:repositorydjangovenvScripts
    
    07/17/2022 03:08 PM <DIR&gt; .
    07/17/2022 03:08 PM &lt;DIR&gt; ..
    07/17/2022 03:08 PM 2,072 activate
    07/17/2022 03:08 PM 1,001 activate.bat
    07/17/2022 03:08 PM 22,159 Activate.ps1
    07/17/2022 03:08 PM 393 deactivate.bat
    07/17/2022 03:08 PM 106,362 pip.exe
    07/17/2022 03:08 PM 106,362 pip3.10.exe
    07/17/2022 03:08 PM 106,362 pip3.exe
    07/17/2022 03:08 PM 264,176 python.exe
    07/17/2022 03:08 PM 252,912 pythonw.exe
    9 File(s) 861,799 bytes
    2 Dir(s) 147,161,825,280 bytes free
    
    C:repositorydjangovenvScripts>cd ..
    
  3. In that folder, there is a file with the name of ‘activate’. It is a file for activating the python virtual environment. The command execution for activating that command is just by executing the command ‘activate’ as follows :

    C:repositorydjangovenvScripts>activate
    
    (venv) C:repositorydjangovenvScripts>
    
  4. After the activation, just execute the following command for check the version of the python. It is a base python for the python virtual environment :

    (venv) C:repositorydjangovenvScripts>python -V
    Python 3.10.5
    
    (venv) C:repositorydjangovenvScripts>
    
  5. Finally, just execute the command for installing ‘psycopg2’ python library once more as follows :

    (venv) C:repositorydjangovenvScripts>pip install psycopg2
    Collecting psycopg2
    Using cached psycopg2-2.9.3-cp310-cp310-win_amd64.whl (1.2 MB)
    Installing collected packages: psycopg2
    Successfully installed psycopg2-2.9.3
    
    (venv) C:repositorydjangovenvScripts>
    

    At last, the execution command for installing ‘psycopg2’ python library is a success.

  • #1

I’m trying to set up a Python application using the cPanel interface. I’ve successfully created it and added the requirements.txt file.

But when I click the «Run Pip Install» button, and select «requirements.txt», after it spins for a while I get this error message:

error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mysqlclient
error: subprocess-exited-with-error

× Running setup.py install for mysqlclient did not run successfully.
│ exit code: 1
╰─> See above for 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.
╰─> mysqlclientnote: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

The requirements.txt file lists

and my Python app is set to use python 3.8.6.

How can I complete the installation?

cPRex


  • #2

Hey there! cPanel doesn’t officially provide support for Python tools as outlined in our notice at the tope of this documentation page:

but have you tried making sure the mysql-community-devel or mysql-devel package is installed? If that is missing, Pip may not be able to build the mysqlclient properly.

This seems to be a relatively recent error as most information I found about this issue was created within the last 6 months. Here is one example:

  • #3

Thanks. In the end I changed from using mysqlclient to mysql-connector-python which installed OK.

A shame the former didn’t work. If I wanted to try again, how would I install the mysql-community-devel or mysql-devel packages on cPanel?

  • #4

Thanks. In the end I changed from using mysqlclient to mysql-connector-python which installed OK.

A shame the former didn’t work. If I wanted to try again, how would I install the mysql-community-devel or mysql-devel packages on cPanel?

Depends on OS but yum should work for AlmaLinux as well or you can use
dnf install [pkg-name]
yum install [pkg-name]

yum install mysql-devel
yum install mysql-community-devel

or

dnf install mysql-devel
dnf install mysql-community-devel

[[email protected] ~]# yum install mysql-community-devel
Last metadata expiration check: 1:53:02 ago on Wed 11 May 2022 11:43:10 PM CDT.
Package mysql-community-devel-8.0.29-1.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[[email protected] ~]# ]yum install mysql-devel
bash: ]yum: command not found
[[email protected] ~]# yum install mysql-devel
Last metadata expiration check: 1:54:11 ago on Wed 11 May 2022 11:43:10 PM CDT.
Package mysql-community-devel-8.0.29-1.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[[email protected] ~]

  • #5

Thank you! I’m a bit wary of installing extra stuff like this, given I’m setting this site up on someone else’s server for them. But it’s useful to know what to do if mysql-connector-python doesn’t work out (or for anyone else finding this page and wondering what to do!).

cPRex


  • #6

I’m glad to hear that worked well!

Понравилась статья? Поделить с друзьями:
  • Subprocess dpkg deb control returned error exit status 2 cydia
  • Subnautica ошибки новичков
  • Submit error success перевод
  • Submit error success perfect world
  • Submission failed http error 422 roblox