我正在尝试按照这个答案安装 Python 3.6 ,但我似乎遇到了麻烦。我的系统如下(在 c9.io 上):
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
Run Code Online (Sandbox Code Playgroud)
当我按照答案(ADD deadsnakes库,说明书apt-get update,sudo apt-get install python3.6),它似乎工作,即我可以运行命令python3.6和解释触发了。
但是,当我尝试从内部使用 pip 时python3.6 -m pip --version,出现以下错误:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name) …Run Code Online (Sandbox Code Playgroud)