![](/img/trans.png)
[英]How to install python3.6 (dev) on Unbuntu 16.04 without colliding with python3.5 (dev)
[英]On ubuntu how to install python3.5 next to an existent python3.6 (or newer) install?
好吧,我目前的主要版本是 python 3.6。 我仍然希望使用這個版本作為主要的python3
版本。 然而,在它旁邊我希望能夠使用 python 3.5(用於開發在 Synology 上使用的腳本,它具有最新版本的 python 3.5)。
我嘗試從 apt 安裝 python 3.5:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libpython3.5-stdlib' for regex 'python3.5'
Note, selecting 'libpython3.5-minimal' for regex 'python3.5'
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
但是在這個python3.5 --version
仍然返回
Command 'python3.5' not found, did you mean:
command 'python3.6' from deb python3.6-minimal
command 'python3.7' from deb python3.7-minimal
我也無法在上述安裝(或以前的版本)的/usr/bin
中找到任何痕跡。 如果搜索我的電腦python3.5
我發現很多文件夾,但是,大多數情況下/snap/core/
我也知道,我也有安裝在一個點上python3.5,后來又升級了。
使用conda或virtualenv在不同的 python 環境和包之間切換要容易得多。 我個人使用miniconda來創建最小的環境。
安裝后只需使用所需的python版本創建一個新環境:
$ conda create --name EnvName python=3.5
並使用$ conda activate EnvName
切換到該環境
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.