我想知道如何正确安装python2.7.在我的其他安装zlib不起作用,pip无法正确安装,我被迫从命令行使用python3.
我有一个新的Ubuntu 17.10安装,并希望能够使用点子和东西.我认为这是因为python已经安装在Ubuntu中并且我安装了另一个版本或者其他东西,因为基于python的命令行工具如波动率起作用.
有没有办法解决它所以我可以安装模块和东西或从命令行使用已经安装的python?
解决方法:
要安装Python 2.7,您只需要在终端中的Ubuntu 17.10中执行以下操作(它们可以开箱即用地工作):
# refreshing the repositories
sudo apt update
# its wise to keep the system up to date!
# you can skip the following line if you not
# want to update all your software
sudo apt upgrade
# installing python 2.7 and pip for it
sudo apt install python2.7 python-pip
# installing python-pip for 3.6
sudo apt install python3-pip
NOTE: Do not try to remove python 3.6 as it will screw up your system
你可以通过以下方式调用python pip:
# for python 2.7
pip2 install
# for python 3.6
pip install
使用没有数字的pip会安装python 3.6软件包.
标签:python,17-10