【发布时间】:2014-04-26 16:45:52
【问题描述】:
我想安装 Python。我尝试了 Python3.3 和 Python3.4 我从https://www.python.org/download/releases/ 下载了文件并按照说明进行操作。 我执行了:
./configure
make
成功。但是当执行时:
make test
test_urllibnet 失败。
所以根据 README 文件如果为 Python3.4 执行:
./python -m test -v test_urllibnet
== CPython 3.4.0 (default, Apr 16 2014, 16:38:06) [GCC 4.8.1]
== Linux-3.11.0-15-generic-x86_64-with-debian-wheezy-sid little-endian
== hash algorithm: siphash24 64bit
== /home/bernard/Python/Python3.4/Python-3.4.0/build/test_python_27532
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_urllibnet
test_urllibnet skipped -- Use of the 'network' resource not enabled
1 test skipped:
test_urllibnet
所以现在它跳过了,因为“网络”没有启用。但是如何启用“网络”?我找不到。
在另一台计算机上,我尝试安装 Python3.3,但出现几乎相同的错误。
./python -m test -v test_urllibnet
== CPython 3.3.5 (default, Apr 24 2014, 17:18:29) [GCC 4.6.3]
== Linux-3.5.0-38-generic-x86_64-with-debian-wheezy-sid little-endian
== /home/bernard/Downloads/Python-3.3.5/build/test_python_6523
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1)
[1/1] test_urllibnet
test_urllibnet skipped -- Use of the 'network' resource not enabled
1 test skipped:
test_urllibnet
Those skips are all expected on linux.
请注意,这对于 Linux 来说应该没问题。但是在Python3.3中声明
Python 3.3.5 (default, Apr 24 2014, 17:18:29)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.3/ssl.py", line 60, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: No module named '_ssl'
所以不好。 python3.3.1 ssl module 中的解决方案看起来很相似,但对我不起作用。
我看过 Building Python and more on missing modules 但也没有结果。
只是安装软件,这里是 Python,正在升级并且变得非常复杂。
【问题讨论】:
-
Python3.6 和 OpenSuse 发生在我身上。通过安装 openssl-devel 库修复。
标签: python-3.x