python从安装与使用pip到入门

官方下载地址:https://www.python.org/downloads/

下载后直接安装就可以了

再配一下环境变量,

cmd运行python -V (注意,这里是大写的V)

 

 打开python跑一跑

如同php的composer和js的npm,python有pip

先在命令行运行pip

如果命令不存在,把python安装目录下的Scripts(.../PythonPython36-32Scripts)加入环境变量,重启cmd运行pip -V试试

新建一个hello.py

 在cmd运行

当在执行pip install xxx.whl时,

1.出现 error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools"

安装 Microsoft visual c++ 14.0
https://964279924.ctfile.com/fs/1445568-239446865

2.有时会报缺少lxml

lxml下载地址:https://pypi.org/project/lxml/4.4.2/#files

3.可能出现is not a supported wheel on this platform

AMD64
import pip._internal
print(pip._internal.pep425tags.get_supported())
原文地址:https://www.cnblogs.com/cxscode/p/7891670.html