常用模块学习
Posted wqq0723
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了常用模块学习相关的知识,希望对你有一定的参考价值。
常用模块学习(一)
-
常用模块学习—小鸡汤
推荐节目—晓说:
《晓说》是2012年3月高晓松开始主持的网络脱口秀节目
每期由主持人高晓松谈论一个热门话题,打造视频化的“高晓松专栏文章”
-
常用模块学习—模块的种类和导入方法
‘‘‘ 1、什么是模块? 在计算机程序的开发过程中,随着程序代码越写越多,在一个文件里代码就会越来越长,越来越不容易维护。 为了编写可维护的代码,我们把很多函数分组,分别放到不同的文件里,这样,每个文件包含的代码就相对较少,很多编程语言都采用这种组织代码的方式。 在Python中,一个.py文件就称之为一个模块(Module)。 2、使用模块的好处: 最大的好处是大大提高了代码的可维护性。 编写代码不必从零开始,当一个模块编写完毕,就可以被其他地方引用。 使用模块还可以避免函数名和变量名冲突。 3、模块的分类: 内置标准模块(又称标准库)执行help(‘modules‘)查看所有python自带模块列表 第三方开源模块,可通过pip install 模块名 联网安装 自定义模块 4、模块的调用(模块一旦被调用,即相当于执行了另外一个py文件里的代码): import module 导入模块 from module import xx,xx 从 module 模块中再导入 xx from module.xx.xx import xx as rename as 起别名 from module.xx.xx import * * 代表所有,不建议使用,变量名容易冲突 ‘‘‘ import os import sys from os import rmdir from os import rmdir,rename #使用逗号分隔,导入多个 print(help(‘modules‘)) #查看所有python自带模块列表
help(‘modules‘) Please wait a moment while I gather a list of all available modules... __future__ _warnings http secrets _abc _weakref idlelib select _ast _weakrefset imaplib selectors _asyncio _winapi imghdr setup _bisect abc imp setup_cython _blake2 aifc importlib setuptools _bootlocale antigravity inspect shelve _bz2 argparse interpreterInfo shlex _codecs array io shutil _codecs_cn ast ipaddress signal _codecs_hk asynchat itertools site _codecs_iso2022 asyncio json sitecustomize _codecs_jp asyncore keyword smtpd _codecs_kr atexit lib2to3 smtplib _codecs_tw audioop linecache sndhdr _collections backend_interagg locale socket _collections_abc base64 logging socketserver _compat_pickle bdb lzma sqlite3 _compression binascii macpath sre_compile _contextvars binhex mailbox sre_constants _csv bisect mailcap sre_parse _ctypes builtins marshal ssl _ctypes_test bz2 math stat _datetime cProfile mimetypes statistics _decimal calendar mmap string _distutils_findvs cgi modulefinder stringprep _dummy_thread cgitb msilib struct _elementtree chardet msvcrt subprocess _functools chunk multiprocessing sunau _hashlib cmath netrc symbol _heapq cmd nntplib symtable _imp code nt sys _io codecs ntpath sysconfig _json codeop nturl2path tabnanny _locale collections numbers tarfile _lsprof colorsys opcode telnetlib _lzma compileall operator tempfile _markupbase concurrent optparse test _md5 configparser os test_pydevd_reload _msi contextlib parser tests_pydevd _multibytecodec contextvars pathlib tests_pydevd_mainloop _multiprocessing copy pdb tests_pydevd_python _opcode copyreg pickle textwrap _operator crypt pickletools this _osx_support csv pip threading _overlapped ctypes pipes time _pickle curses pkg_resources timeit _py_abc dataclasses pkgutil tkinter _pydecimal datetime platform token _pydev_bundle dbm plistlib tokenize _pydev_imps decimal poplib trace _pydev_runfiles difflib posixpath traceback _pydevd_bundle dis pprint tracemalloc _pydevd_frame_eval distutils profile tty _pyio doctest pstats turtle _queue dummy_threading pty turtledemo _random easy_install py_compile types _sha1 email pyclbr typing _sha256 encodings pycompletionserver unicodedata _sha3 ensurepip pydev_app_engine_debug_startup unittest _sha512 enum pydev_coverage urllib _signal errno pydev_ipython uu _sitebuiltins faulthandler pydev_pysrc uuid _socket filecmp pydev_run_in_console venv _sqlite3 fileinput pydevconsole warnings _sre fnmatch pydevd wave _ssl formatter pydevd_concurrency_analyser weakref _stat fractions pydevd_file_utils webbrowser _string ftplib pydevd_plugins winreg _strptime functools pydoc winsound _struct gc pydoc_data wsgiref _symtable genericpath pyexpat xdrlib _testbuffer getopt queue xml _testcapi getpass quopri xmlrpc _testconsole gettext random xxsubtype _testimportmultiple glob re zipapp _testmultiphase gzip reprlib zipfile _thread hashlib rlcompleter zipimport _threading_local heapq runfiles zlib _tkinter hmac runpy _tracemalloc html sched Enter any module name to get more help. Or, type "modules spam" to search for modules whose name or summary contain the string "spam".
-
常用模块学习—模块的导入路径
#模块一旦被调用,即相当于执行了另外一个py文件里的代码 #自定义模块 #这个最简单, 创建一个.py文件,就可以称之为模块,就可以在另外一个程序里导入 import sys print(sys.path) ‘‘‘ 输出: [ ‘E:\\Python\\work\\myFirstPro\\第4章‘, ‘E:\\Python‘, ‘C:\\Python37\\python37.zip‘, ‘C:\\Python37\\DLLs‘, ‘C:\\Python37\\lib‘, ‘C:\\Python37‘, ‘C:\\Python37\\lib\\site-packages‘, ‘C:\\JetBrains\\PyCharm 2018.2.1\\helpers\\pycharm_matplotlib_backend‘ ] sys.path.append(‘E:\\Python\\work\\myFirstPro\\第4章‘) print(sys.path) #import my_modules #del my_modules 小结: python解释器会按照列表顺序去依次到每个目录下去匹配你要导入的模块名, 只要在一个目录下匹配到了该模块名,就立刻导入,不再继续往后找。 注意:列表第一个元素为空,即代表当前目录,所以你自己定义的模块在当前目录会被优先导入。 ‘‘‘
-
常用模块学习—开源模块的安装方式
-
开源模块
-
https://pypi.python.org/pypi 是python的开源模块库,截止2017年9.30日 ,已经收录了118170个来自全世界python开发者贡献的模块,几乎涵盖了你想用python做的任何事情。 事实上每个python开发者,只要注册一个账号就可以往这个平台上传你自己的模块,这样全世界的开发者都可以容易的下载并使用你的模块。
直接在上面这个页面上点download,下载后,解压并进入目录,执行以下命令完成安装
编译源码 python setup.py build
安装源码 python setup.py install
直接通过pip安装
pip3 install paramiko #paramiko 是模块名 安装
pip3 uninstal paramiko 卸载
import paramiko 使用
pip命令会自动下载模块包并完成安装。
软件一般会被自动安装你python安装目录的这个子目录里
/your_python_install_path/3.6/lib/python3.6/site-packages
-
常用模块学习—使用国内源文件下载
pip命令默认会连接在国外的python官方服务器下载,速度比较慢,你还可以使用国内的豆瓣源,数据会定期同步国外官网,速度快好多。
sudo pip install -i http://pypi.douban.com/simple/ alex_sayhi --trusted-host pypi.douban.com #alex_sayhi是模块名
Microsoft Windows [版本 10.0.17134.285] (c) 2018 Microsoft Corporation。保留所有权利。 E:Python>pip3 install PyTyrion Collecting PyTyrion Using cached https://files.pythonhosted.org/packages/c4/22/167ec8e203b0f930582a82a1bfcf7faf9d14af3 Using cached https://files.pythonhosted.org/packages/c4/22/167ec8e203b0f930582a82a1bfc Using cached https://files.pythonhosted.org/packages/c4/22/167ec8e203b0f930582a82a1b Using cached https://files.pythonhosted.org/packages/c4/22/167ec8e203b0f930582a82a Using cached https://files.pythonhosted.org/packages/c4/22/167ec8e203b0f93058 2a Using cached https://files.pythonhosted.org/packages/c4/22/167ec 8b0f930582a82a1bfcf7faf9d14af3a0d6abc807dbb22ed52f8/PyTyrion-1.0.1.tar e203b0f930582a82a1bfcf7faf9d14af3a0d6abc807dbb22ed52f8/PyTyrion-1. Using cached https://files.pythonhosted.org/packages/c4/22/167 ec 8e203b0f930582a82a1bfcf7faf9d14af3a0d6abc807dbb22ed52f8/PyTyrion -1 Using cached https://files.pythonhosted.org/packages/c4/22/1 67 ec8e203b0f930582a82a1bfcf7faf9d14af3a0d6abc807dbb22ed52f8/PyTy ri Using cached https://files.pythonhosted.org/packages/c4/22/167ec8e20 3b0f930582a82a1bfcf7faf9d14af3a0d6abc807dbb22ed52f8/PyTyrion-1.0.1.t ar.gz Installing collected packages: PyTyrion Running setup.py install for PyTyrion ... done Successfully installed PyTyrion-1.0.1 You are using pip version 10.0.1, however version 18.0 is availabl eou should consider upgrading via the ‘python -m pip install --upgrad You are using pip version 10.0.1, however version 18.0 is avai l. You are using pip version 10.0.1, however version 18.0 is a va You are using pip version 10.0.1, however version 18.0 is a You are using pip version 10.0.1, however version 18.0 Running setup.py install for PyTyrion ... done Successfully installed PyTyrion-1.0.1 You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the ‘python -m pip inst all --upgrade pip‘ command. E:Python>pip3 uninstall PyTyrion Uninstalling PyTyrion-1.0.1: Would remove: c:python37libsite-packagespytyrion-1.0.1-py3.7.eg g-info c:python37libsite-packages yrion* Proceed (y/n)? y Successfully uninstalled PyTyrion-1.0.1 You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the ‘python -m pip inst all --upgrade pip‘ command. E:Python>pip3 install PyTyrion Collecting PyTyrion Using cached https://files.pythonhosted.org/packages/c4/22/167ec8e203b0f930582a82a1bfcf7faf 9d14af3a0d6abc807dbb22ed52f8/PyTyrion-1.0.1.tar.gz Installing collected packages: PyTyrion Running setup.py install for PyTyrion ... done Successfully installed PyTyrion-1.0.1 You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command. (venv) E:Python>pip3 install -i http://pypi.douban.com/simp le/alex_sayhi --trusted-host pypi.douban.com You must give at least one requirement to install (see "pip help install") You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command. (venv) E:Python>pip3 install -i http://pypi.douban.com/simp le/ alex_sayhi --trusted-host pypi.douban.com Collecting alex_sayhi Downloading http://pypi.doubanio.com/packages/84/14/b59d93276c86f6ab556cfa7c2d860b742c1611b601cc 4c7743d129b4b52a/alex_sayhi-1.0.0.tar.gz Installing collected packages: alex-sayhi Running setup.py install for alex-sayhi ... done Successfully installed alex-sayhi-1.0.0 You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command. E:Python>
E:Python>pip3 install paramiko Collecting paramiko Downloading https://files.pythonhosted.org/packages/3e/db/cb7b6656e0e7387637ce850689084dc0b9 4b44df31cc52e5fc5c2c4fd2c1/paramiko-2.4.1-py2.py3-none-any.whl (194kB) 78% |█████████████████████████▎ | 153kB 255kB/s eta 0:00:01 84% |███████████████████████████ | 163kB 255kB/s eta 0:00:0 89% |████████████████████████████▋ | 174kB 276kB/s eta 0:00 94% |██████████████████████████████▎ | 184kB 275kB/s eta 0: 100% |████████████████████████████████| 194kB 383kB/s Collecting pyasn1>=0.1.7 (from paramiko) Downloading https://files.pythonhosted.org/packages/d1/a1/7790cc85db38daa874f6a2e6308131b995 3feb1367f2ae2d1123bb93a9f5/pyasn1-0.4.4-py2.py3-none-any.whl (72kB) 84% |███████████████████████████ | 61kB 393kB/s eta 0:00:01 98% |███████████████████████████████▋| 71kB 417kB/s eta 0: 100% |████████████████████████████████| 81kB 436kB/s Collecting pynacl>=1.0.1 (from paramiko) Downloading https://files.pythonhosted.org/packages/6c/93/29931e02f3add7952f2ea1976960c8a591 a92dcc57a76cd3d736e1c554d0/PyNaCl-1.2.1-cp37-cp37m-win_amd64.whl (165kB) 80% |█████████████████████████▊ | 133kB 278kB/s eta 0:00:01 86% |███████████████████████████▋ | 143kB 936kB/s eta 0:00: 92% |█████████████████████████████▋ | 153kB 655kB/s eta 0:0 98% |███████████████████████████████▋| 163kB 595kB/s eta 0 100% |████████████████████████████████| 174kB 936kB/s Collecting bcrypt>=3.1.3 (from paramiko) Downloading https://files.pythonhosted.org/packages/5c/35/5cedb29e9d18108fa54fd383f76e086ad8 ebab9d1d476e8411445c61cccd/bcrypt-3.1.4-cp37-cp37m-win_amd64.whl Collecting cryptography>=1.5 (from paramiko) Downloading https://files.pythonhosted.org/packages/39/dd/43985388f82ac0b4698671e96235c6324b df14339e21eb3647f4e5b99017/cryptography-2.3.1-cp37-cp37m-win_amd64.whl (1.3MB) 79% |█████████████████████████▍ | 1.0MB 122kB/s eta 0:00:03 79% |█████████████████████████▋ | 1.0MB 141kB/s eta 0:00:02 80% |█████████████████████████▉ | 1.1MB 157kB/s eta 0:00:02 81% |██████████████████████████ | 1.1MB 133kB/s eta 0:00:02 82% |██████████████████████████▍ | 1.1MB 138kB/s eta 0:00:0 83% |██████████████████████████▋ | 1.1MB 101kB/s eta 0:00:0 83% |██████████████████████████▉ | 1.1MB 101kB/s eta 0:00:0 84% |███████████████████████████ | 1.1MB 147kB/s eta 0:00:0 85% |███████████████████████████▍ | 1.1MB 115kB/s eta 0:00: 86% |███████████████████████████▋ | 1.1MB 114kB/s eta 0:00: 87% |███████████████████████████▉ | 1.1MB 83kB/s eta 0:00:0 87% |████████████████████████████ | 1.1MB 77kB/s eta 0:00:0 88% |████████████████████████████▍ | 1.2MB 82kB/s eta 0:00: 89% |████████████████████████████▋ | 1.2MB 87kB/s eta 0:00: 90% |████████████████████████████▉ | 1.2MB 78kB/s eta 0:00: 90% |█████████████████████████████ | 1.2MB 47kB/s eta 0:00: 91% |█████████████████████████████▍ | 1.2MB 37kB/s eta 0:00 92% |█████████████████████████████▋ | 1.2MB 37kB/s eta 0:00 93% |█████████████████████████████▉ | 1.2MB 31kB/s eta 0:00 94% |██████████████████████████████ | 1.2MB 27kB/s eta 0:00 94% |██████████████████████████████▍ | 1.2MB 30kB/s eta 0:0 95% |██████████████████████████████▋ | 1.2MB 27kB/s eta 0:0 96% |██████████████████████████████▉ | 1.3MB 27kB/s eta 0:0 97% |███████████████████████████████ | 1.3MB 25kB/s eta 0:0 97% |███████████████████████████████▍| 1.3MB 24kB/s eta 0: 98% |███████████████████████████████▋| 1.3MB 35kB/s eta 0: 99% |███████████████████████████████▉| 1.3MB 42kB/s eta 0: 100% |████████████████████████████████| 1.3MB 41kB/s Collecting cffi>=1.4.1 (from pynacl>=1.0.1->paramiko) Downloading https://files.pythonhosted.org/packages/ca/f2/e375b7469a2dfe9d1feac81a10df97f18c d771b9a10ac62ca9864b760f7c/cffi-1.11.5-cp37-cp37m-win_amd64.whl (165kB) 80% |█████████████████████████▊ | 133kB 108kB/s eta 0:00:01 86% |███████████████████████████▋ | 143kB 134kB/s eta 0:00: 92% |█████████████████████████████▋ | 153kB 139kB/s eta 0:0 98% |███████████████████████████████▋| 163kB 136kB/s eta 0 100% |████████████████████████████████| 174kB 161kB/s Collecting six (from pynacl>=1.0.1->paramiko) Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29 a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl Collecting asn1crypto>=0.21.0 (from cryptography>=1.5->paramiko) Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad 7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB) 90% |█████████████████████████████ | 92kB 212kB/s eta 0:00: 100% |████████████████████████████████| 102kB 220kB/s Collecting idna>=2.1 (from cryptography>=1.5->paramiko) Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a 97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB) 87% |████████████████████████████▏ | 51kB 234kB/s eta 0:00: 100% |████████████████████████████████| 61kB 262kB/s Collecting pycparser (from cffi>=1.4.1->pynacl>=1.0.1->paramiko) Downloading https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177ad cc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz (245kB) 79% |█████████████████████████▎ | 194kB 361kB/s eta 0:00:01 83% |██████████████████████████▋ | 204kB 278kB/s eta 0:00:0 87% |████████████████████████████ | 215kB 248kB/s eta 0:00: 91% |█████████████████████████████▎ | 225kB 249kB/s eta 0:0 95% |██████████████████████████████▋ | 235kB 239kB/s eta 0: 99% |████████████████████████████████| 245kB 239kB/s eta 0 100% |████████████████████████████████| 256kB 292kB/s Installing collected packages: pyasn1, pycparser, cffi, six, pynacl, bcrypt, asn1crypto, idna, cryptography, paramiko Running setup.py install for pycparser ... done Successfully installed asn1crypto-0.24.0 bcrypt-3.1.4 cffi-1.11.5 cryptography-2.3.1 idna-2.7 paramiko-2.4.1 pyasn1-0.4.4 pycparser-2.18 pynacl-1.2.1 six-1.11.0 You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command. 使用国内豆瓣源下载速度对比: Microsoft Windows [版本 10.0.17134.285] (c) 2018 Microsoft Corporation。保留所有权利。 E:Python>pip3 install -i http://pypi.douban.com/simple/ paramiko Looking in indexes: http://pypi.douban.com/simple/ Collecting paramiko The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead The repository located at pypi.douban.com is not a trusted or secure host and i s being ignored. If this repository is available via HTTPS we recommend you use HTT PS instead, otherwise you may silence this warning and allow it anyway with ‘--trus The repository located at pypi.douban.com is not a trusted or secure host an d i s being ignored. If this repository is available via HTTPS we recommend you us e H TTPS instead, otherwise you may silence this warning and allow it anyway with The repository located at pypi.douban.com is not a trusted or sec ure host and is being ignored. If this repository is available via HTT PS we recommend you use HTTPS instead, otherwise you may silence this war The repository located at pypi.douban.com is not a trusted or s ec ure host and is being ignored. If this repository is available vi a HTTPS we recommend you use HTTPS instead, otherwise you may silen ce this warning and allow it anyway with ‘--trusted-host pypi.douba n. com‘. HTTPS we recommend you use HTTPS instead, otherwise you may si len ce this warning and allow it anyway with ‘--trusted-host pypi. dou ban.com‘. HTTPS we recommend you use HTTPS instead, otherwise you may may silence this warning and allow it anyway with ‘--tr ust pypi.douban.com‘. sted-host pypi.douban.com‘. Could not find a version that satisfies the requireme may silence this warning and allow it anyway with ‘--t rusted-host pypi.douban.com‘. HTTPS we recommend you use HTTPS instead, otherw is e you may silence this warning and allow it anyw ay with ‘--trusted-host pypi.douban.com‘. HTTPS we recommend you use HTTPS instead, ot herwise you may silence this warning and a ll ow it anyway with ‘--trusted-host pypi.dou ba n.com‘. Could not find a version that satisfies herwise you may silence this warning and a requirement paramiko (from versions: ) llow it anyway with ‘--trusted-host pypi. d ouban.com‘. Could not find a version that satisfies the requirement paramiko (from versions: )ou should consider upgrading via the ‘pyt No matching distribution found for parami the requirement paramiko (from versions : ) No matching distribution found for param Could not find a version that satisfies the requirement paramiko (from versions: ) No matching distribution found for paramiko You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the ‘python -m pip install --upgra You are using pip version 10.0.1, however version 18.0 is availab lou should consider upgrading via the ‘python -m pip install --upg You are using pip version 10.0.1, however version 18.0 is avail ab You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip‘ comma You are using pip version 10.0.1, however version 18.0 is availa b You are using pip version 10.0.1, however version 18 .0 You are using pip version 10.0.1, however vers i 18.0 is available. You are using pip version 10.0.1, however ve ron 18.0 is available. You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command. E:Python>pip3 install -i http://pypi.douban.com/simple/ paramiko --trusted-host pypi.douban.com Looking in indexes: http://pypi.douban.com/simple/ Collecting paramiko Downloading http://pypi.doubanio.com/packages/3e/db/cb7b6656e0e7387637ce850689084dc0b94b44df31cc52e5fc5c2c4fd2c1/paramiko- 2.4.1-py2.py3-none-any.whl (194kB) 100% |████████████████████████████████| 194kB 655kB/s Requirement already satisfied: pynacl>=1.0.1 in c:python37libsite-packages (from paramiko) (1.2.1) Requirement already satisfied: pyasn1>=0.1.7 in c:python37libsite-packages (from paramiko) (0.4.4) Requirement already satisfied: cryptography>=1.5 in c:python37libsite-packages (from paramiko) (2.3.1) Requirement already satisfied: bcrypt>=3.1.3 in c:python37libsite-packages (from paramiko) (3.1.4) Requirement already satisfied: cffi>=1.4.1 in c:python37libsite-packages (from pynacl>=1.0.1->paramiko) (1.11.5) Requirement already satisfied: six in c:python37libsite-packages (from pynacl>=1.0.1->paramiko) (1.11.0) Requirement already satisfied: idna>=2.1 in c:python37libsite-packages (from cryptography>=1.5->paramiko) (2.7) Requirement already satisfied: asn1crypto>=0.21.0 in c:python37libsite-packages (from cryptography>=1.5->paramiko) (Requirement already satisfied: idna>=2.1 in c:python37libsite-packages (from cryptography>=1.5->pa ramiko) (2.7) Requirement already satisfied: idna>=2.1 in c:python37libsite -p ackages (from cryptography>=1.5->paramiko) (2.7) Requirement already satisfied: asn1crypto>=0.21.0 in c:python37 l ibsite-packages (from cryptography>=1.5->paramiko) (0.24.0) Requirement already satisfied: pycparser in c:python37libsite Requirement already satisfied: asn1crypto>=0.21.0 in c:plibsite-packages (from cryptography>=1.5->paramiko) (0.24.0) ython37libsite-packages (from cryptography>=1.5->param ipackages (from cffi>=1.4.1->pynacl>=1.0.1->paramiko) (2.18) ko) (0.24.0) Requirement already satisfied: pycparser in c:python37lou are using pip version 10.0.1, however version 18.0 is availa ibsite-packages (from cffi>=1.4.1->pynacl>=1.0.1->param iou should consider upgrading via the ‘python -m pip install --u Requirement already satisfied: pycparser in c:python37libsite-packages (from cffi>=1.4.1->pynacl>=1.0.1->paramik o) (2.18) Installing collected packages: paramiko Successfully installed paramiko-2.4.1 You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command.
以上是关于常用模块学习的主要内容,如果未能解决你的问题,请参考以下文章