Gautam dhyagni
Gautam dhyagni

Reputation: 21

pyenv install 3.10 error on ubuntu 24.04: BUILD FAILED (Ubuntu 24.04 using python-build 20180424)

gautam-dhyagni@gautam-H410M-S2-V2:~$ pyenv install 3.10
Downloading Python-3.10.14.tar.xz...
-> https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tar.xz
Installing Python-3.10.14...

BUILD FAILED (Ubuntu 24.04 using python-build 20180424)

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

Last 10 log lines:
  File "/tmp/python-build.20240509100702.184910/Python-3.10.14/Lib/ensurepip/__init__.py", line 287, in _main
    return _bootstrap(
  File "/tmp/python-build.20240509100702.184910/Python-3.10.14/Lib/ensurepip/__init__.py", line 203, in _bootstrap
    return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
  File "/tmp/python-build.20240509100702.184910/Python-3.10.14/Lib/ensurepip/__init__.py", line 104, in _run_pip
    return subprocess.run(cmd, check=True).returncode
  File "/tmp/python-build.20240509100702.184910/Python-3.10.14/Lib/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/tmp/python-build.20240509100702.184910/Python-3.10.14/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmp0g477mtu/setuptools-65.5.0-py3-none-any.whl\', \'/tmp/tmp0g477mtu/pip-23.0.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmp0g477mtu\', \'--root\', \'/\', \'--upgrade\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
make: *** [Makefile:1280: install] Error 1

I have tried apt update & upgrade, still issue there.

Upvotes: 2

Views: 3182

Answers (1)

ebocko
ebocko

Reputation: 53

ensurepip is disabled. Check the python version (probably 3.12) and install venv:

sudo apt-get install python3.12-venv

check if it's there:

python3 -m ensurepip --default-pip

pyenv should work now.

Upvotes: 1

Related Questions