pyenv不会建立新的python版本(挂起)

时间:2019-04-15 20:32:59

标签: python ubuntu-16.04 pyenv

我按照tutorial from Northwestern安装pyenv,似乎命令可以正常工作。但是当我跑步

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
Installing Python-3.7.0...

我已经运行tail -F /tmp/python-build.somenumber.log并获得

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

直到我终止安装。然后,日志文件具有

$ 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... %   

在另一个构建版本上进行测试时,一切看起来都相同,日志文件的尾部看起来也不同

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... %  

也许花了这么长时间,但是我都将它们都运行了15个小时以上,因此我认为有些地方出了问题。我找不到别人遇到此问题的优秀SO或其他文章。有什么建议吗?

$ 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

无疑会有所不同,但我正在运行zsh。

编辑:也尝试过bash。将导出功能放在~/.bash_profile~/.bashrc中没有成功。我不认为这些会是错误,因为我可以很好地调用该程序,而这正是这些导出所要做的,但是我无法通过链接不同的文档来弄清楚两位评论者的建议。

编辑2: 在详细模式下运行,在安装行之后我仍然看不到任何东西

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:1)

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