Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DistutilsPlatformError: #11258

Closed
1 task done
nitinr01 opened this issue Jul 14, 2022 · 1 comment
Closed
1 task done

DistutilsPlatformError: #11258

nitinr01 opened this issue Jul 14, 2022 · 1 comment
Labels
resolution: wrong project Should be reported elsewhere

Comments

@nitinr01
Copy link

Description

Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Hi\AppData\Local\Temp\pip-install-4fgmxe40\cffi_0a2fa14dc9824f2e9822e204c8511258\setup.py", line 126, in
if sys.platform == "win32" and uses_msvc():
File "C:\Users\Hi\AppData\Local\Temp\pip-install-4fgmxe40\cffi_0a2fa14dc9824f2e9822e204c8511258\setup.py", line 105, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools_distutils\command\config.py", line 223, in try_compile
self._compile(body, headers, include_dirs, lang)
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools_distutils\command\config.py", line 128, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools_distutils_msvccompiler.py", line 361, in compile
self.initialize()
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools_distutils_msvccompiler.py", line 234, in initialize
raise DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: --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: 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.

F:\OnlineVoting-Django\OnlineVoting-Django>

Expected behavior

No response

pip version

22.1.2

Python version

3.9.6

OS

windows

How to Reproduce

error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Hi\AppData\Local\Temp\pip-install-4fgmxe40\cffi_0a2fa14dc9824f2e9822e204c8511258\setup.py", line 126, in
if sys.platform == "win32" and uses_msvc():
File "C:\Users\Hi\AppData\Local\Temp\pip-install-4fgmxe40\cffi_0a2fa14dc9824f2e9822e204c8511258\setup.py", line 105, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools_distutils\command\config.py", line 223, in try_compile
self._compile(body, headers, include_dirs, lang)
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools_distutils\command\config.py", line 128, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools_distutils_msvccompiler.py", line 361, in compile
self.initialize()
File "C:\msys64\mingw64\lib\python3.9\site-packages\setuptools_distutils_msvccompiler.py", line 234, in initialize
raise DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: --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: 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.

Output

No response

Code of Conduct

@nitinr01 nitinr01 added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 14, 2022
@pfmoore
Copy link
Member

pfmoore commented Jul 14, 2022

As the output says:

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

In this case, the problem is with setuptools, and you're running on mingw64 or msys64. I believe mingw64 have their own patches (Python and setuptools don't support mingw64 by default) so you raise the issue with them in the first instance.

@uranusjr uranusjr added resolution: wrong project Should be reported elsewhere and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Jul 17, 2022
@uranusjr uranusjr closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: wrong project Should be reported elsewhere
Projects
None yet
Development

No branches or pull requests

3 participants