10

I followed the tutorial from Northwestern to install pyenv and it seems the commands work. But when I run

pyenv install 3.7.0

(or whatever version) it just hangs. I get:

Downloading Python-3.7.0.tar.xz...
-> https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
Installing Python-3.7.0...

I have run tail -F /tmp/python-build.somenumber.log and get

/tmp/python-build.numbers.number ~/Path
/tmp/python-build.numbers.number/Python-3.7.0 /tmp/python-build.numbers.number ~/path

until I kill the install. Then the log file has

$ tail -n 20 /tmp/python-build.numbers.log
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking shadow.h usability... %   

Testing on another build version everything looked the same the tail of the log file looks different

checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for --with-pydebug... no
checking for --with-assertions... no
checking for --enable-optimizations... no
checking for --with-lto... no
checking target system type... x86_64-pc-linux-gnu
checking for -llvm-profdata... no
checking for llvm-profdata... ''
checking for -Wextra... yes
checking whether gcc accepts and needs -fno-strict-aliasing... no
checking if we can turn off gcc unused result warning... yes
checking if we can turn off gcc unused parameter warning... yes
checking if we can turn off gcc missing field initializers warning... yes
checking if we can turn off gcc invalid function cast warning... no
checking if we can turn on gcc mixed sign comparison warning... yes
checking if we can turn on gcc unreachable code warning... no
checking if we can turn on gcc strict-prototypes warning... no
checking if we can make implicit function declaration an error in gcc... yes
checking whether pthreads are available without options... %  

Maybe it just takes that long, but I ran both of these over 15 hrs each and so I assume something is going very wrong. I can't find a good SO or other post where someone else is experiencing this problem. Any advice?

$ uname -a
Linux foo 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Doubt it'll be the difference, but I'm running zsh.

Edit: Have tried in bash as well. Placing the export functions in ~/.bash_profile and ~/.bashrc with no success. I didn't think these would be the errors since I can call the program just fine and that's all these exports are doing, but I can't figure out what the two commenters are trying to suggest by linking different documentations.

Edit 2: Running with verbose mode I still see nothing after the Installing line

2
  • I'm not sure what you're getting at. The information is the same in the tutorial I linked. Or am I missing something? Apr 15, 2019 at 20:44
  • Considering all 3 links have the same information I'm going to need a little more help than <link to different doc>. Trying the instructions in both (removing ~/.pyenv each time) I am still getting the same thing. A helpful comment would be an offending line or the key part that I'm missing. I did in fact read the docs before installing (see original post). Apr 15, 2019 at 21:02

2 Answers 2

12

Are you sure you have all build deps installed on your system ? if not run the following :

sudo apt-get install make build-essential libssl-dev zlib1g-dev libbz2-dev \ libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ xz-utils tk-dev libffi-dev liblzma-dev python-openssl git

remove the old version : rm -rvf ~/.pyenv/versions/3.7.0

then run again : pyenv install -v 3.7.0

4
  • 1
    I am sure. I copied that exact line. The solution was ctrl-c (see my answer). I submitted a bug report to them. Apr 17, 2019 at 0:40
  • 1
    doing these steps helped me out. Thanks WaLid
    – McFrank
    Jan 20, 2021 at 20:26
  • 1
    Thanks the first line saved my day...
    – SHANNAX
    Aug 6, 2022 at 10:31
  • 1
    Thanks. Needed python3-openssl for me on Ubuntu 22.04.
    – Nick P
    May 20 at 15:50
9

It seems there is some bug. If I hit ctrl-C (once!) it starts building, and successfully works. Will submit bug report.

2
  • Does this bug still exist? This does not work for me.
    – amzon-ex
    Mar 26, 2022 at 8:56
  • Same. Bug still happens for me. No solution found.
    – Brian Yeh
    Jun 23, 2022 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.