因为pymongo只有.whl安装包,所以须要先安装wheelpython
输入以下指令安装wheellinux
# pip install wheel
接着下载pymongo对应版本,必定要与python的版本对应,如箭头所示
centos
# wget https://files.pythonhosted.org/packages/30/f9/78dd244df932309299288a452d1c3524f6f7746f1813b8a8417952b1d9ce/pymongo-3.6.1-cp36-cp36m-manylinux1_x86_64.whl
下载后安装:code
# pip install pymongo-3.6.1-cp36-cp36m-manylinux1_x86_64.whl
检查安装版本:orm
[root@VM_0_8_centos local]# python Python 3.6.2 (default, May 24 2018, 23:30:13) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pymongo >>> pymonog.version Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'pymonog' is not defined >>> pymongo.version '3.6.1'