- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我使用 VMplayer,我的操作系统是 Lubuntu 14.04。它预装了python3.4.0,但我想安装python3.4.3。我从 here 下载了 .tar.xz 文件.
然后我提取文件并按照自述文件中的说明进行操作:
./configure
make
make test
当我第一次运行时
make test
它说“3 次测试失败,3 次更改执行环境,25 次跳过”。我在这里发布了关于 SO 的问题: Installing Python3.4.3: 3 tests failed, 3 altered execution environment and 25 skipped
然后我做了
sudo apt-get install libssl-dev
做了
./configure
make
再次,它说:
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _curses _curses_panel
_dbm _gdbm _lzma
_sqlite3 _tkinter readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
当我尝试的时候
make test
它说
1 test failed:
test_ssl
2 tests altered the execution environment:
test___all__ test_warnings
21 tests skipped:
test_bz2 test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_gdb test_idle test_kqueue test_lzma test_msilib
test_ossaudiodev test_readline test_sqlite test_startfile test_tcl
test_tk test_ttk_guionly test_ttk_textonly test_winreg
test_winsound test_zipfile64
Re-running failed tests in verbose mode
Re-running test 'test_ssl' in verbose mode
test_ssl: testing with 'OpenSSL 1.0.1f 6 Jan 2014' (1, 0, 1, 6, 15)
under Linux ('debian', 'jessie/sid', '')
HAS_SNI = True
OP_ALL = 0x-7ffffc01
OP_NO_TLSv1_1 = 0x10000000
test__create_stdlib_context (test.test_ssl.ContextTests) ... ok
test_cert_store_stats (test.test_ssl.ContextTests) ... ok
test_check_hostname (test.test_ssl.ContextTests) ... ok
test_ciphers (test.test_ssl.ContextTests) ... ok
test_constructor (test.test_ssl.ContextTests) ... ok
test_create_default_context (test.test_ssl.ContextTests) ... ok
test_get_ca_certs (test.test_ssl.ContextTests) ... ok
test_load_cert_chain (test.test_ssl.ContextTests) ... ok
test_load_default_certs (test.test_ssl.ContextTests) ... ok
test_load_default_certs_env (test.test_ssl.ContextTests) ... ok
test_load_default_certs_env_windows (test.test_ssl.ContextTests) ... skipped 'Windows specific'
test_load_dh_params (test.test_ssl.ContextTests) ... ok
test_load_verify_cadata (test.test_ssl.ContextTests) ... ok
test_load_verify_locations (test.test_ssl.ContextTests) ... ok
test_options (test.test_ssl.ContextTests) ... ok
test_protocol (test.test_ssl.ContextTests) ... ok
test_session_stats (test.test_ssl.ContextTests) ... ok
test_set_default_verify_paths (test.test_ssl.ContextTests) ... ok
test_set_ecdh_curve (test.test_ssl.ContextTests) ... ok
test_sni_callback (test.test_ssl.ContextTests) ... ok
test_sni_callback_refcycle (test.test_ssl.ContextTests) ... ok
test_verify_flags (test.test_ssl.ContextTests) ... ok
test_verify_mode (test.test_ssl.ContextTests) ... ok
test_DER_to_PEM (test.test_ssl.BasicSocketTests) ... ok
test_asn1object (test.test_ssl.BasicSocketTests) ... ok
test_constants (test.test_ssl.BasicSocketTests) ... ok
test_dealloc_warn (test.test_ssl.BasicSocketTests) ... ok
test_enum_certificates (test.test_ssl.BasicSocketTests) ... skipped 'Windows specific'
test_enum_crls (test.test_ssl.BasicSocketTests) ... skipped 'Windows specific'
test_errors (test.test_ssl.BasicSocketTests) ... ok
test_get_default_verify_paths (test.test_ssl.BasicSocketTests) ... ok
test_match_hostname (test.test_ssl.BasicSocketTests) ... ok
test_openssl_version (test.test_ssl.BasicSocketTests) ... ok
test_parse_cert (test.test_ssl.BasicSocketTests) ...
{'issuer': ((('countryName', 'XY'),),
(('localityName', 'Castle Anthrax'),),
(('organizationName', 'Python Software Foundation'),),
(('commonName', 'localhost'),)),
'notAfter': 'Oct 5 23:01:56 2020 GMT',
'notBefore': 'Oct 8 23:01:56 2010 GMT',
'serialNumber': 'D7C7381919AFC24E',
'subject': ((('countryName', 'XY'),),
(('localityName', 'Castle Anthrax'),),
(('organizationName', 'Python Software Foundation'),),
(('commonName', 'localhost'),)),
'subjectAltName': (('DNS', 'localhost'),),
'version': 3}
{'OCSP': ('http://ocsp.verisign.com',),
'caIssuers': ('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',),
'crlDistributionPoints': ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',),
'issuer': ((('countryName', 'US'),),
(('organizationName', 'VeriSign, Inc.'),),
(('organizationalUnitName', 'VeriSign Trust Network'),),
(('organizationalUnitName',
'Terms of use at https://www.verisign.com/rpa (c)10'),),
(('commonName', 'VeriSign Class 3 International Server CA - G3'),)),
'notAfter': 'Sep 20 23:59:59 2012 GMT',
'notBefore': 'Sep 21 00:00:00 2011 GMT',
'serialNumber': '2EE6EA7640A075CEE5005F4D7C79549A',
'subject': ((('countryName', 'FI'),),
(('stateOrProvinceName', 'Espoo'),),
(('localityName', 'Espoo'),),
(('organizationName', 'Nokia'),),
(('organizationalUnitName', 'BI'),),
(('commonName', 'projects.developer.nokia.com'),)),
'subjectAltName': (('DNS', 'projects.developer.nokia.com'),
('DNS', 'projects.forum.nokia.com')),
'version': 3}
ok
test_parse_cert_CVE_2013_4238 (test.test_ssl.BasicSocketTests) ...
{'issuer': ((('countryName', 'US'),),
(('stateOrProvinceName', 'Oregon'),),
(('localityName', 'Beaverton'),),
(('organizationName', 'Python Software Foundation'),),
(('organizationalUnitName', 'Python Core Development'),),
(('commonName', 'null.python.org\x00example.org'),),
(('emailAddress', 'python-dev@python.org'),)),
'notAfter': 'Aug 7 13:12:52 2013 GMT',
'notBefore': 'Aug 7 13:11:52 2013 GMT',
'serialNumber': '00',
'subject': ((('countryName', 'US'),),
(('stateOrProvinceName', 'Oregon'),),
(('localityName', 'Beaverton'),),
(('organizationName', 'Python Software Foundation'),),
(('organizationalUnitName', 'Python Core Development'),),
(('commonName', 'null.python.org\x00example.org'),),
(('emailAddress', 'python-dev@python.org'),)),
'subjectAltName': (('DNS', 'altnull.python.org\x00example.com'),
('email', 'null@python.org\x00user@example.org'),
('URI', 'http://null.python.org\x00http://example.org'),
('IP Address', '192.0.2.1'),
('IP Address', '2001:DB8:0:0:0:0:0:1\n')),
'version': 3}
ok
test_purpose_enum (test.test_ssl.BasicSocketTests) ... ok
test_random (test.test_ssl.BasicSocketTests) ...
RAND_status is 1 (sufficient randomness)
ok
test_random_fork (test.test_ssl.BasicSocketTests) ... ok
test_refcycle (test.test_ssl.BasicSocketTests) ... ok
test_server_side (test.test_ssl.BasicSocketTests) ... ok
test_timeout (test.test_ssl.BasicSocketTests) ... ok
test_tls_unique_channel_binding (test.test_ssl.BasicSocketTests) ... ok
test_unknown_channel_binding (test.test_ssl.BasicSocketTests) ... ok
test_unsupported_dtls (test.test_ssl.BasicSocketTests) ... ok
test_wrapped_unconnected (test.test_ssl.BasicSocketTests) ... ok
test_lib_reason (test.test_ssl.SSLErrorTests) ... ok
test_str (test.test_ssl.SSLErrorTests) ... ok
test_subclass (test.test_ssl.SSLErrorTests) ... ok
test_algorithms (test.test_ssl.NetworkedTests) ...
Cipher with ('sha256.tbs-internet.com', 443) is ('RC4-SHA', 'TLSv1/SSLv3', 128)
Certificate is:
{'OCSP': ('http://ocsp.tbs-x509.com',),
'caIssuers': ('http://crt.tbs-internet.com/TBSX509CASGC.crt',
'http://crt.tbs-x509.com/TBSX509CASGC.crt'),
'crlDistributionPoints': ('http://crl.tbs-internet.com/TBSX509CASGC.crl',
'http://crl.tbs-x509.com/TBSX509CASGC.crl'),
'issuer': ((('countryName', 'FR'),),
(('stateOrProvinceName', 'Calvados'),),
(('localityName', 'Caen'),),
(('organizationName', 'TBS INTERNET'),),
(('organizationalUnitName',
'Terms and Conditions: '
'http://www.tbs-internet.com/CA/repository'),),
(('organizationalUnitName', 'TBS INTERNET CA'),),
(('commonName', 'TBS X509 CA SGC'),)),
'notAfter': 'Feb 17 23:59:59 2016 GMT',
'notBefore': 'Feb 11 00:00:00 2014 GMT',
'serialNumber': '1F94DEE8F046B340A6026500A4002CF8',
'subject': ((('countryName', 'FR'),),
(('postalCode', '14000'),),
(('stateOrProvinceName', 'Calvados'),),
(('localityName', 'CAEN'),),
(('streetAddress', '22 RUE DE BRETAGNE'),),
(('organizationName', 'TBS INTERNET'),),
(('organizationalUnitName', '0002 440443810'),),
(('organizationalUnitName', 'sha-256 production'),),
(('commonName', 'sha256.tbs-internet.com'),)),
'subjectAltName': (('DNS', 'sha256.tbs-internet.com'),
('DNS', 'www.sha256.tbs-internet.com')),
'version': 3}
ok
test_ciphers (test.test_ssl.NetworkedTests) ... ok
test_connect (test.test_ssl.NetworkedTests) ... ok
test_connect_cadata (test.test_ssl.NetworkedTests) ... ok
test_connect_capath (test.test_ssl.NetworkedTests) ... ok
test_connect_ex (test.test_ssl.NetworkedTests) ... ok
test_connect_ex_error (test.test_ssl.NetworkedTests) ... ok
test_connect_with_context (test.test_ssl.NetworkedTests) ... ERROR
/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/unittest/case.py:605: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=2049, proto=0, laddr=('192.168.174.253', 37135), raddr=('82.94.164.164', 443)>
outcome.errors.clear()
test_context_setget (test.test_ssl.NetworkedTests) ... ok
test_get_ca_certs_capath (test.test_ssl.NetworkedTests) ... ok
test_get_server_certificate (test.test_ssl.NetworkedTests) ... [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
Verified certificate for svn.python.org:443 is
-----BEGIN CERTIFICATE-----
MIIEzzCCAregAwIBAgIDDkGJMA0GCSqGSIb3DQEBBQUAMHkxEDAOBgNVBAoTB1Jv
b3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZ
Q0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9y
dEBjYWNlcnQub3JnMB4XDTEzMTIyNDIwMjgzMloXDTE1MTIyNDIwMjgzMlowGTEX
MBUGA1UEAxMOc3ZuLnB5dGhvbi5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDM6un3wTW9+HVJ7KC+/GwL0KAxehug0tw2YoSSX+TGxLyr9AUtBHQk
hCNWhRLewa0WMOY6hxIIQY1Hp6vreDiCbBehjVkEAydlKBzaAsgYCEbCC/ZaMzhv
aaFAiLVeaxAKJsBGUJNz5hGgzd67A6SGz+XK7qDWig4NR5eFrsr3DvjyEM7txMiG
gftGWLkadOuqUQsI20AykBGi+RxmrQIwqO2svGmje89DsWVILdP37PssM2zqRonh
4fUKooei3L43tXbTdHayXc9NtFS7q8T4eUlyWaD+BtP80QQOQFFvi+qZpme9bmYI
7YPX+e86lZtxAKM9nWrP93qc+2nS0MsHAgMBAAGjgb8wgbwwDAYDVR0TAQH/BAIw
ADAOBgNVHQ8BAf8EBAMCA6gwNAYDVR0lBC0wKwYIKwYBBQUHAwIGCCsGAQUFBwMB
BglghkgBhvhCBAEGCisGAQQBgjcKAwMwMwYIKwYBBQUHAQEEJzAlMCMGCCsGAQUF
BzABhhdodHRwOi8vb2NzcC5jYWNlcnQub3JnLzAxBgNVHR8EKjAoMCagJKAihiBo
dHRwOi8vY3JsLmNhY2VydC5vcmcvcmV2b2tlLmNybDANBgkqhkiG9w0BAQUFAAOC
AgEAvq2TlM5voqqwlfbEIwdNM3RlqHattH/h2Pqkr5FV6nynhcNyP9wBJyS5mdlt
+tj1Fy6oV+iN0s8VglrwhsmYN2pbJkCJZcNgrhFTiOvZ3HJ0jxkQ8TaROfcH1RnZ
q45DcbSnryiIDBQNYxmUf/bE6Ce+48fiOJpTRtrC8iWfz4J/JHYZ5FVKx+SsC67o
E1iCT2/r1PSvzTg/bohL1kX6Aj3H3UqlXDuDybyHRrTn9kUwCgXK2h4x/qae6xjo
Gy++gtzg4XlJEAh65znJ2RlAYi3lvhCls+viR5vSIXBEXmBPFNonGnPtGRyx6Tii
5ncSUP+bp6aaRZb0qEi0k1R5XYPt5Hm7T/h4IOAKlx7gPMMLOXqbrlWpjgwhfysI
f/KkgGBq7nTsC6WeaW/QUQtdXqWULrK+nINY+s/CRX5UxdAWpqMxqgNkP3zef9yO
etgfpR+6NArjiLNcfJO2yGZTcXn1H2gewTcxwmc+QVWday9HcS3paMpot8BwWUpI
LzOLGTeNH+rQCUAKJHAiK3Ogee+hka4icIN7cKOIIVfZ/XBj1Ex7zjc3j72axNba
S1buqvrm12YCE5+xAjYwU/Nrl4HNFKCoPW7qfEaEuwp49pieAIOnXa82rCh/UdAv
dSj5JpEvxjTuZdVfbk2VUc/z2OeLzFlrQRJsOt1MisY0Aoc=
-----END CERTIFICATE-----
skipped "Resource 'ipv6.google.com' is not available"
test_makefile_close (test.test_ssl.NetworkedTests) ... ok
test_non_blocking_connect_ex (test.test_ssl.NetworkedTests) ... ok
test_non_blocking_handshake (test.test_ssl.NetworkedTests) ...
Needed 3 calls to do_handshake() to establish session.
ok
test_timeout_connect_ex (test.test_ssl.NetworkedTests) ... ok
test_asyncore_server (test.test_ssl.ThreadedTests)
Check the example asyncore integration. ...
server: new connection from 127.0.0.1:57771
client: sending b'FOO\n'...
server: read b'FOO\n' from client
client: read b'foo\n'
client: closing connection.
client: connection closed.
cleanup: stopping server.
cleanup: joining server thread.
server: read b'over\n' from client
server: closed connection <ssl.SSLSocket [closed] fd=-1, family=AddressFamily.AF_INET, type=2049, proto=0>
server: read b'' from client
cleanup: successfully joined.
ok
test_check_hostname (test.test_ssl.ThreadedTests) ...
server: new connection from ('127.0.0.1', 47566)
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
server: new connection from ('127.0.0.1', 47927)
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
ok
test_compression (test.test_ssl.ThreadedTests) ... server: new connection from ('127.0.0.1', 44281)
client: sending b'FOO\n'...
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: closing connection.
got compression: None
ok
test_compression_disabled (test.test_ssl.ThreadedTests) ... server: new connection from ('127.0.0.1', 44325)
client: sending b'FOO\n'...
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: closing connection.
ok
test_crl_check (test.test_ssl.ThreadedTests) ...
server: new connection from ('127.0.0.1', 42401)
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
server: new connection from ('127.0.0.1', 39995)
server: bad connection attempt from ('127.0.0.1', 39995):
Traceback (most recent call last):
File "/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/test/test_ssl.py", line 1532, in wrap_conn
self.sock, server_side=True)
File "/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 365, in wrap_socket
_context=self)
File "/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 583, in __init__
self.do_handshake()
File "/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 810, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:600)
server: new connection from ('127.0.0.1', 55142)
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
ok
test_default_ciphers (test.test_ssl.ThreadedTests) ... ok
test_default_ecdh_curve (test.test_ssl.ThreadedTests) ... server: new connection from ('127.0.0.1', 49676)
server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
ok
test_dh_params (test.test_ssl.ThreadedTests) ... server: new connection from ('127.0.0.1', 45312)
client: sending b'FOO\n'...
server: connection cipher is now ('DHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: closing connection.
ok
test_do_handshake_enotconn (test.test_ssl.ThreadedTests) ... ok
test_echo (test.test_ssl.ThreadedTests)
Basic test of an SSL client connecting to a server ...
server: new connection from ('127.0.0.1', 60169)
client: sending b'FOO\n'...
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: closing connection.
server: new connection from ('127.0.0.1', 57455)
client: sending b'FOO\n'...
server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: closing connection.
server: new connection from ('127.0.0.1', 54910)
client: sending b'FOO\n'...
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: sending b'FOO\n'...
client: read b'foo\n'
client: closing connection.
server: new connection from ('127.0.0.1', 44655)
client: sending b'FOO\n'...
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
======================================================================
ERROR: test_connect_with_context (test.test_ssl.NetworkedTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/test/test_ssl.py", line 1285, in test_connect_with_context
s.connect(("svn.python.org", 443))
File "/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 846, in connect
self._real_connect(addr, False)
File "/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 837, in _real_connect
self.do_handshake()
File "/home/a/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 810, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:600)
----------------------------------------------------------------------
Ran 99 tests in 85.177s
FAILED (errors=1, skipped=5)
test test_ssl failed
make: *** [test] Error 1
中间的代码有点多,但我删除了它,因为它会超过 body 限制。尽管如此,最主要的是,1 个测试失败,2 个测试改变了执行环境,21 个测试被跳过。
即使我按照 the Python downloads page 上的确切步骤操作,我也知道为什么我会失败并跳过测试?有没有更简单的方法在我的操作系统上安装 Python3.4.3?
最佳答案
从测试来看,Python 构建正常。 “Python build finished successfully!”
缺少的模块在那里,因为您的计算机上没有安装相关软件。
这与使用 apt-get 没有什么不同,例如您缺少 _tkinter
这是因为您没有运行它所需的包。因此,如果您使用的是 apt-get
,则必须使用 apt-get install python-tk
以便 apt-get
能够引入相关依赖。逻辑是,如果您没有安装软件,您将不需要模块来对其进行编程。
我在 make tests
中看到的唯一问题是 ssl
失败。
1 test failed:
test_ssl
查看测试结果你会看到:-
test_ssl: testing with 'OpenSSL 1.0.1f 6 Jan 2014' (1, 0, 1, 6, 15)
under Linux ('debian', 'jessie/sid', '')
HAS_SNI = True
OP_ALL = 0x-7ffffc01
OP_NO_TLSv1_1 = 0x10000000
此版本的 OpenSSL 包含去年发现并在 OpenSSL 1.0.1j [2014 年 10 月 15 日] 中修复的 SSL 协议(protocol)漏洞。您可以找到此信息 here .
我不太喜欢 Ubuntu,因为我使用的是 Fedora,但你可以试试 :-
apt-get update
apt-get dist-upgrade
看看这是否修复了您的计算机存在的 SSL 漏洞。
附带说明一下,如果您希望为您使用的系统以外的系统开发 Python 应用程序,那么从源代码安装是唯一的选择。
从 tar.gz
编译有很多很好的理由。
大多数 Linux 发行版在内部使用 Python,因此链接到一个版本。
导入的模块之间可能会发生冲突。
您可以针对不同版本的 python 测试您的代码。
您不需要 root 权限来设置您自己的版本,因此您的操作独立于操作系统所需的任何内容。
所以在这个例子中,我的家是 /home/paul
并且我已经在我家的根目录中创建了目录。一个名为 src
的目录将用作源目录,另一个名为 opt
的目录将保存我的 Python 版本。
诀窍是告诉 Python 安装要去哪里。所以将tar.gz
文件放到src
目录下,展开。打开终端并...
cd ~/src/Python-X.X.X
./configure --prefix=/home/paul/opt/python.x.x.x
make
make test <optional>
make install
请注意,我从来没有使用过 sudo
,因为我有权访问我的主目录,而且我不会影响系统上的任何其他内容。
现在测试...
~/opt/python.3.4.2/bin/python3
Python 3.4.2 (default, Mar 28 2015, 19:36:24)
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
您可以在新版本出现时继续添加测试版本,只需记住通过指向您要使用的版本来开始您的代码。
关于python - 在 Lubuntu 14.04 上安装 Python3.4.3 时出现错误/测试失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29886229/
我获得了一些源代码示例,我想测试一些功能。不幸的是,我在执行程序时遇到问题: 11:41:31 [linqus@ottsrvafq1 example]$ javac -g test/test.jav
我想测试ggplot生成的两个图是否相同。一种选择是在绘图对象上使用all.equal,但我宁愿进行更艰巨的测试以确保它们相同,这似乎是identical()为我提供的东西。 但是,当我测试使用相同d
我确实使用 JUnit5 执行我的 Maven 测试,其中所有测试类都有 @ExtendWith({ProcessExtension.class}) 注释。如果是这种情况,此扩展必须根据特殊逻辑使测试
在开始使用 Node.js 开发有用的东西之前,您的流程是什么?您是否在 VowJS、Expresso 上创建测试?你使用 Selenium 测试吗?什么时候? 我有兴趣获得一个很好的工作流程来开发我
这个问题已经有答案了: What is a NullPointerException, and how do I fix it? (12 个回答) 已关闭 3 年前。 基于示例here ,我尝试为我的
我正在考虑测试一些 Vue.js 组件,作为 Laravel 应用程序的一部分。所以,我有一个在 Blade 模板中使用并生成 GET 的组件。在 mounted 期间请求生命周期钩子(Hook)。假
考虑以下程序: #include struct Test { int a; }; int main() { Test t=Test(); std::cout<
我目前的立场是:如果我使用 web 测试(在我的例子中可能是通过 VS.NET'08 测试工具和 WatiN)以及代码覆盖率和广泛的数据来彻底测试我的 ASP.NET 应用程序,我应该不需要编写单独的
我正在使用 C#、.NET 4.7 我有 3 个字符串,即。 [test.1, test.10, test.2] 我需要对它们进行排序以获得: test.1 test.2 test.10 我可能会得到
我有一个 ID 为“rv_list”的 RecyclerView。单击任何 RecyclerView 项目时,每个项目内都有一个可见的 id 为“star”的 View 。 我想用 expresso
我正在使用 Jest 和模拟器测试 Firebase 函数,尽管这些测试可能来自竞争条件。所谓 flakey,我的意思是有时它们会通过,有时不会,即使在同一台机器上也是如此。 测试和函数是用 Type
我在测试我与 typeahead.js ( https://github.com/angular-ui/bootstrap/blob/master/src/typeahead/typeahead.js
我正在尝试使用 Teamcity 自动运行测试,但似乎当代理编译项目时,它没有正确完成,因为当我运行运行测试之类的命令时,我收到以下错误: fatal error: 'Pushwoosh/PushNo
这是我第一次玩 cucumber ,还创建了一个测试和 API 的套件。我的问题是在测试 API 时是否需要运行它? 例如我脑子里有这个, 启动 express 服务器作为后台任务 然后当它启动时(我
我有我的主要应用程序项目,然后是我的测试的第二个项目。将所有类型的测试存储在该测试项目中是一种好的做法,还是应该将一些测试驻留在主应用程序项目中? 我应该在我的主项目中保留 POJO JUnit(测试
我正在努力弄清楚如何实现这个计数。模型是用户、测试、等级 用户 has_many 测试,测试 has_many 成绩。 每个等级都有一个计算分数(strong_pass、pass、fail、stron
我正在尝试测试一些涉及 OkHttp3 的下载代码,但不幸失败了。目标:测试 下载图像文件并验证其是否有效。平台:安卓。此代码可在生产环境中运行,但测试代码没有任何意义。 产品代码 class Fil
当我想为 iOS 运行 UI 测试时,我收到以下消息: SetUp : System.Exception : Unable to determine simulator version for X 堆
我正在使用 Firebase Remote Config 在 iOS 上设置 A/B 测试。 一切都已设置完毕,我正在 iOS 应用程序中读取服务器端默认值。 但是在多个模拟器上尝试,它们都读取了默认
[已编辑]:我已经用 promise 方式更改了我的代码。 我正在写 React with this starter 由 facebook 创建,我是测试方面的新手。 现在我有一个关于图像的组件,它有
我是一名优秀的程序员,十分优秀!