admin管理员组

文章数量:1122846

I am trying to install the new python version and am trying using pyenv. I keep getting this error.

pyenv install 3.13.0 -f
Downloading Python-3.13.0.tar.xz...
\-\> .13.0/Python-3.13.0.tar.xz
Installing Python-3.13.0...

BUILD FAILED (MINGW64_NT-10.0-19045 3.4.10-87d57229.x86_64 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20250105182021.11329
Results logged to /tmp/python-build.20250105182021.11329.log

Last 10 log lines:
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking for --with-app-store-compliance... not patching for app store compliance  
checking for gcc... no
checking for cc... no
checking for cl.exe... no
checking for clang... no
configure: error: in `/tmp/python-build.20250105182021.11329/Python-3.13.0': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details

I can see the version when I try pyenv install -l

python -V gives me

Python 3.8.2

I am on Windows, using bash [MINGW64] . Can someone help me out here?

I am trying to run my FastAPI code but the is failing:

ImportError: cannot import name 'Annotated' from 'typing' (c:\python38\lib\typing.py

I need to update this version to run the code.

I am trying to install the new python version and am trying using pyenv. I keep getting this error.

pyenv install 3.13.0 -f
Downloading Python-3.13.0.tar.xz...
\-\> https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tar.xz
Installing Python-3.13.0...

BUILD FAILED (MINGW64_NT-10.0-19045 3.4.10-87d57229.x86_64 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20250105182021.11329
Results logged to /tmp/python-build.20250105182021.11329.log

Last 10 log lines:
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking for --with-app-store-compliance... not patching for app store compliance  
checking for gcc... no
checking for cc... no
checking for cl.exe... no
checking for clang... no
configure: error: in `/tmp/python-build.20250105182021.11329/Python-3.13.0': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details

I can see the version when I try pyenv install -l

python -V gives me

Python 3.8.2

I am on Windows, using bash [MINGW64] . Can someone help me out here?

I am trying to run my FastAPI code but the is failing:

ImportError: cannot import name 'Annotated' from 'typing' (c:\python38\lib\typing.py

I need to update this version to run the code.

Share Improve this question asked yesterday Utkarsh PandeyUtkarsh Pandey 1 New contributor Utkarsh Pandey is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1
  • Have you read this documentation? Maybe you shouldn't be trying to use pyenv at all – SIGHUP Commented yesterday
Add a comment  | 

1 Answer 1

Reset to default 0

The issue is that Windows cannot detect the presence of a suitable C compiler on your system, as referenced by the error message

configure: error: no acceptable C compiler found in $PATH See `config.log' for more details

To resolve the problem, you can install a C compiler by following, for example, these steps .

You can verify that the C compiler was installed by typing, for example,

gcc --version

and the output should look something like this:

$ gcc --version
gcc.exe (Rev6, Built by MSYS2 project) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Once you have installed your compiler, try to rerun your command again.


As a note, you may be better off using pyenv-win, since according to Pyenv's installation instructions on Github, pyenv is not natively supported on Windows.

Pyenv does not officially support Windows and does not work in Windows outside the Windows Subsystem for Linux. Moreover, even there, the Pythons it installs are not native Windows versions but rather Linux versions running in a virtual machine -- so you won't get Windows-specific functionality.

本文标签: Trying to install python 3121 or 3130Stack Overflow