有个Django的项目,需要python3.4环境,但我的 ubuntu16.04 里之前已安装了python3.5,我sudo apt-get install python3.4
老是安装不了,显示:根据正则表达式“python3.4”选中了‘libpython3.4-minimal’。
尝试卸载python3.5,sudo apt-get remove python3.5, apt-get removeall python3.5
都不管用,执行python3.5依旧存在。
如何安装python3.4? 如何彻底卸载python3.5?
It is generally not recommended to uninstall the python that comes with the system
Please use virtualenv
Uninstalling the python that comes with the system may cause problems
Why not use
virtualenv
或者pyenv
, a standard multi-version coexistence solutionTry to uninstall python3
If it doesn’t work, use virtualenv first
Python3.5 is dependent on the system and cannot be uninstalled. You can try it
In the
ubuntu16.04 x64 server
virtual machine, searching forapt search python3.4
yielded no results. I also tried more variant matching methods but yielded no results.ubuntu16.04 x64 server
虚拟机, 搜索apt search python3.4
无结果. 也试了更多变种的匹配方式也无结果.事实上, 官方软件仓库中通常不会存储有一个软件或库的多个版本, 而会选择当前的最新稳定版.
因此, 推荐使用多版本环境管理. 除了上述工具, 也可使用
conda
. 推荐理由是, 由大公司维护, 在python
官方软件源外, 还维护有一个包含大量科学计算包的源, 其中所有的包都维持最新版本.创建环境时, 可指定
anaconda
, 其是一个包组, 包含完整的科学计算包.这里推荐设定两个别名,
alias py3.4='source activate py3.4'
和alias py-='source deactivate'
. 注意, 别名是py-
, 意为去除环境.更多命令参数, 运行
In fact, the official software repository usually does not store multiple versions of a software or library, but the latest stable version is selected. 🎜 🎜Therefore, it is recommended to use multi-version environment management. In addition to the above tools, you can also useconda --help
conda
. The reason for recommendation is that it is maintained by a large company. In addition to the official software source ofpython
, there are also Maintains a repository containing a large number of scientific computing packages, all of which are kept at the latest version.🎜 rrreee 🎜When creating an environment, you can specifyanaconda
, which is a package group that contains complete scientific computing packages. 🎜 🎜It is recommended to set two aliases here,alias py3.4='source activate py3.4'
andalias py-='source deactivate'
. Note that the alias is py-, means to remove the environment.🎜 🎜For more command parameters, runconda --help
to get them.🎜