python + pip

python

由荷兰人Guido van Rossum于1989年发明的一种解释型、面向对象、动态数据类型的交互式高级程序设计语言(脚本语言),源代码遵循GPL(GNU General Public License)协议
设计哲学:优雅、明确、简单
初识Python,关于Python的前期预热可参见:Python生态系统入门

  • 可移植性、跨平台,可扩展、可嵌入,“脚本化”
  • 支持互动模式
  • 强制用空白符(White Space)作为语句缩进

推荐书籍

  • Mark Lutz -《Learning Python》
  • Swaroop, C.H. - A Byte of Python 之《简明Python教程》
  • Magnus Lie Hetland -《Python基础教程》
  • Wesley Chun -《Python核心编程》
  • Toby Segaran -《集体智慧编程》

菜鸟教程 | Python 基础教程
Python之路Python学习笔记系列
Python基础Python快速教程
循序渐进学PythonPython Day系列

pip

C:\Users\sunqh下新建文件夹pip,然后新建文件pip.ini,配置镜像

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn

常用命令备用

pip install pkgName
pip install pkgName -i 镜像地址 //临时使用

问题解决

若安装时出现报错:

Command "python setup.py egg_info" failed with error code 1 in C:\Users\xxx
You are using pip version 18.1, however version 20.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command

按提示即可解决

pip install --upgrade setuptools
python -m pip install --upgrade pip

若还是报错:

ERROR: Command errored out with exit status 1:
 command: 'd:\downsoft\python\python\python.exe ...
Complete output (41 lines):
WARNING: The wheel package is not available.

按提示即可解决pip3 install wheel

posted @ 2020-08-03 19:36  万箭穿心,习惯就好。  阅读(264)  评论(0编辑  收藏  举报