如何在Linux系统上安装unidecode Python模块?
要安装unidecode或任何其他Python模块,您需要安装pip(Python软件包管理器)。如果您已经从python.org安装了Python 2>=2.7.9或Python 3>=3.4,您将已经安装了pip和setuptools,但需要升级到最新版本:
在Linux或macOS系统中:
pip install -U pip setuptools
在Windows系统中:
python -m pip install -U pip setuptools
如果您在Linux系统上使用由系统软件包管理器(如“yum”、“apt-get”等)管理的Python安装,并希望使用系统软件包管理器来安装或升级pip,则参见: https://packaging.python.org/guides/installing-using-linux-tools/
否则:
从以下地址下载get-pip.py: https://bootstrap.pypa.io/get-pip.py. 运行python get-pip.py。这将安装或升级pip。
现在您可以使用pip来安装Python软件包。例如,要安装最新版本的’unidecode’:
$ pip install 'unidecode'
要安装特定版本:
$ pip install 'unidecode==0.04'
要安装大于或等于一个版本且小于另一个版本:
$ pip install 'unidecode>=0,<1'