Repository navigation
Closed
Labels
Description
Prerequisites
- Make sure your problem is not listed in the common build problems.
- Make sure no duplicated issue has already been reported in the pyenv issues. For build errors, a reported issue typically mentions a key error message. This key error message is often not in the 10 last build log lines reported to the console but is rather earlier in the build log -- typically, it's the first error message encountered in the log.
- Make sure you are reporting a problem in Pyenv and not seeking consultation with Pyenv usage.
- GitHub issues are intended mainly for Pyenv development purposes. If you are seeking help with Pyenv usage, check Pyenv documentation, go to a user community site like Gitter, StackOverflow, etc, or to Discussions.
- Make sure your problem is not derived from packaging (e.g. Homebrew).
- Please refer to the package documentation for the installation issues, etc.
- Make sure your problem is not derived from plugins.
- This repository is maintaining
pyenvand the defaultpython-buildplugin only. Please refrain from reporting issues of other plugins here.
- This repository is maintaining
Describe the bug
$ pyenv install 3.4
Downloading Python-3.4.10.tar.xz...
-> https://www.python.org/ftp/python/3.4.10/Python-3.4.10.tar.xz
Installing Python-3.4.10...
BUILD FAILED (Arch rolling using python-build 2.6.22)
Inspect or clean up the working tree at /tmp/python-build.20260227172023.271368
Results logged to /tmp/python-build.20260227172023.271368.log
Last 10 log lines:
if test "xupgrade" != "xno" ; then \
case upgrade in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
LD_LIBRARY_PATH=/tmp/python-build.20260227172023.271368/Python-3.4.10 ./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
/tmp/python-build.20260227172023.271368/Python-3.4.10/python: Error while finding spec for 'ensurepip.__main__' (<class 'ImportError'>: No module named 'math'); 'ensurepip' is a package and cannot be directly executed
make: *** [Makefile:1004: install] Error 1
Build fails on ensurepip.
Reproduction steps
pyenv install 3.4
Diagnostic details
- Platform information (e.g. Ubuntu Linux 24.04): Arch Linux 6.18.9-arch1-2
- OS architecture (e.g. amd64): amd64
- pyenv version: 2.6.22
- Python version: 3.14.3
- C Compiler information (e.g. gcc 7.3): 15.2.1 20260209
- Please attach the debug trace of the failing command as a gist: https://gist.github.com/dodancs/b375373b77ac2d78d0d375ca02fc2981
- Run
env PYENV_DEBUG=1 <faulty command> 2>&1 | tee trace.logand attachtrace.log. E.g. if you have a problem with installing Python, runenv PYENV_DEBUG=1 pyenv install -v <version> 2>&1 | tee trace.log(note the-voption topyenv install).
- Run
- If you have a problem with installing Python, please also attach
config.logfrom the build directory- The build directory is reported after the "BUILD FAILED" message and is usually under
/tmp.
- The build directory is reported after the "BUILD FAILED" message and is usually under
- If the build succeeds but the problem is still with the build process (e.g. the resulting Python is missing a feature), please attach
- the debug trace from reinstalling the faulty version with
env PYENV_DEBUG=1 pyenv install -f -k -v <version> 2>&1 | tee trace.log config.logfrom the build directory. When usingpyenv installwith-kas per above, the build directory will be under$PYENV_ROOT/sources.
- the debug trace from reinstalling the faulty version with
- If the problem happens in another Pyenv invocation, turn on debug logging by setting
PYENV_DEBUG=1, e.g.env PYENV_DEBUG=1 pyenv local 3.6.4, and attach the resulting trace as a gist - If the problem happens outside of a Pyenv invocation, get the debug trace like this:
export PYENV_DEBUG=1 # for Bash export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' # for Zsh export PS4='+(%x:%I): %N(%i): ' set -x <reproduce the problem> set +x
Activity
native-api commentedon Mar 1, 2026
Try with
PYTHON_CFLAGS="-std=c99"sinpiis new in C23 which is the default since GCC 15.github-actions commentedon Apr 1, 2026
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
[-]Cannot install 3.4.10[/-][+]Cannot install 3.4.10: "error: static declaration of ‘sinpi’ follows non-static declaration"[/+]vsa77 commentedon Jun 4, 2026
I'll pick up where y'all left off.
Diagnostic details
- [x] Build log for
pyenv install 3.4.10(65399) andpyenv install 3.4.10 PYTHON_CFLAGS="-std=c99"(79187) in this gist.- [x] Build log for
env PYENV_DEBUG=1 pyenv install -v 3.4 2>&1 | tee trace.log(93130) in this gist.- [x] Config logs for all three install attempts are in this gist.
- [x] trace.log (93130) is in this gist.
native-api commentedon Jun 4, 2026
@vsa77 This issue has been addressed in 2.6.32.
native-api commentedon Jun 4, 2026
@vsa77 FYI in "
pyenv install 3.4.10 PYTHON_CFLAGS="-std=c99"", the "variable assignment" is actually interpreted as an extra command line argument.The proper Bash syntax for a variable assignment for a specific command is
PYTHON_CFLAGS="-std=c99" pyenv install 3.4.10.vsa77 commentedon Jun 4, 2026
I updated/upgraded pyenv to the latest version (2.7.1) and tried installing 3.4.10 again and received the same error.
Having said that, I might have discovered the underlying issue:
I mentioned above that my
pyenv --versionwas 2.6.31, which I'm assuming was what was upgraded to 2.7.1.rm -rf $(pyenv root)from the home directory. Also removed it from $PATH and any references to it in bashrc, etc.pyenvand the response was a command not found.pyenvand the pyenv help message displayed. Usedpyenv --versionand the response waspyenv 2.6.8rm -rf python-build*pyenv which pyenvshowed pyenv was also in /usr/share/pyenv/libexec/pyenv.sudo rm -rf /usr/share/pyenvremoved 2.6.8apt remove pyenvwhich removed pyenv 2.6.8-1pyenvand the response was "No such file or directory."Multiple versions of pyenv were installed, and I'm hypothesizing that the latest version (with the fix) was not the version that was being invoked when I was trying to install 3.4.10.
I don't have time to do a reinstall at the moment, but when I do I will come back and verify whether the newest version worked.