【发布时间】:2019-07-02 02:09:31
【问题描述】:
Ubuntu 14.04安装了3个python版本2.7/3.4/3.6;
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
python3 默认运行 3.4。
$ python3
Python 3.4.3 (default, Nov 28 2017, 16:41:13)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
我想将 python 3.6 设为默认。我该怎么做? 其次,由于 python3.4 是默认的,pip3 使用它并且无法安装更令人担忧的 slackclient 模块
$ sudo pip3 install slackclient
Downloading/unpacking slackclient
Downloading slackclient-2.1.0-py2.py3-none-any.whl (51kB): 51kB downloaded
Downloading/unpacking aiohttp>3.5.2 (from slackclient)
Downloading aiohttp-3.5.4.tar.gz (1.1MB): 1.1MB downloaded
Running setup.py (path:/tmp/pip_build_root/aiohttp/setup.py) egg_info for package aiohttp
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/aiohttp/setup.py", line 13, in <module>
raise RuntimeError("aiohttp 3.x requires Python 3.5.3+")
RuntimeError: aiohttp 3.x requires Python 3.5.3+
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/aiohttp/setup.py", line 13, in <module>
raise RuntimeError("aiohttp 3.x requires Python 3.5.3+")
RuntimeError: aiohttp 3.x requires Python 3.5.3+
----------------------------------------
Cleaning up...
非常感谢任何帮助。
我看到 python3 符号链接到 python3.4,不确定更改是否会有所帮助,因为这是一个生产系统,所以我不想做任何我不知道的事情。
/usr/bin$ ls -l python3.4*
-rwxr-xr-x 2 root root 3714088 Nov 28 2017 python3.4
lrwxrwxrwx 1 root root 33 Nov 28 2017 python3.4-config -> x86_64-linux-gnu-python3.4-config
-rwxr-xr-x 2 root root 3714088 Nov 28 2017 python3.4m
lrwxrwxrwx 1 root root 34 Nov 28 2017 python3.4m-config -> x86_64-linux-gnu-python3.4m-config
【问题讨论】:
标签: python python-3.x ubuntu