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

double-beep
  • 5,031
  • 17
  • 33
  • 41
Steven Walton
  • 505
  • 6
  • 20
  • I'm not sure what you're getting at. The information is the same in the tutorial I linked. Or am I missing something? – Steven Walton Apr 15 '19 at 20:44
  • Considering all 3 links have the same information I'm going to need a little more help than . 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). – Steven Walton Apr 15 '19 at 21:02

2 Answers2

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

WaLid LamRaoui
  • 2,305
  • 2
  • 15
  • 33
9

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

Steven Walton
  • 505
  • 6
  • 20