Score:1

pyenv error when installing python version

na flag

I installed penv (2.3.17) on ubuntu 22.10. When i try to install any python version I get the error:

enjamin@bens-mini-note:~$ pyenv install 3.7.0
Downloading Python-3.7.0.tar.xz...
-> https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
error: failed to download Python-3.7.0.tar.xz

BUILD FAILED (Ubuntu 22.10 using python-build 20180424)

Results logged to /tmp/python-build.20230417084707.21389.log

Last 10 log lines:
/tmp/python-build.20230417084707.21389 ~
curl: (23) Failure writing output to destination

Using sudo don't work ida with error: command not found.

David avatar
cn flag
If you change the default version of Python that came with the OS you will no longer have a functional OS and will need to re install.
noskule avatar
na flag
I don't want to change the default version, I want to add a new version which sould be installed in ~/.pyenv/versions So I can use it to work with code which reqires a specific version.
Score:1
cn flag

Looking at the log, curl: (23) Failure writing output to destination means you have either run out of disk space, or there is a permissions error.

Since the /tmp/python-build.20230417084707.21389 ~ suggests pushd was used to change into a new temporary directory created under /tmp before running curl, too little free space in your /tmp directory is the most likely cause.

Your /tmp directory is likely a small ramdisk. You might be able to remove some old files from it.

However, there is also a /var/tmp actually on your disk you could use instead, by passing this to the command in the environment variable $TMPDIR, like this:

TMPDIR=/var/tmp pyenv install 3.7.0
Score:0
in flag

The answer I found on SO should help. https://stackoverflow.com/a/67853440/5833429

See required dependencies for pyenv https://github.com/pyenv/pyenv/wiki#suggested-build-environment

On ubuntu you need

sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.