Python 安装与命令行参数 ,Pip 的命令参数--官方文档

python 解释器

1、Python 命令行参数 --官方文档:https://docs.python.org/zh-cn/3/using/cmdline.html#options-you-shouldn-t-use

2、在Windows上使用 Python       :https://docs.python.org/zh-cn/3/using/windows.html

 

=====================================================================

pip 包管理工具。安装后的包放置位置,默认是:X:\Python安装位置\Lib\site-packages

1、列出已安装的包 : pip list     ;查看可升级的包:pip list -o

2、显示安装包信息 :  pip show    ; 查看指定包的详细信息:  pip show -f SomePackage

3、安装包  :

pip install SomePackage              # 最新版本
pip install SomePackage==1.0.4 # 指定版本 pip install 'SomePackage>=1.0.4' # 最小版本

升级包: 升级指定的包,通过使用==, >=, <=, >, < 来指定一个版本号。
pip install --upgrade SomePackage

4、卸载包: pip uninstall SomePackage

5、搜索包 :pip search SomePackage

6、生成requirements.txt文件  :    pip freeze > requirements.txt

     安装requirements.txt依赖  :  pip install -r requirements.txt

@@@@@@@@@@@@@@@#######################

pip 的下载源的设置:(Windows10/201X)

    使用 pip 命令时,通过 -i 参数指定 pip 源 :

pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
  清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
  阿里云:https://mirrors.aliyun.com/pypi/simple/
  豆瓣:https://pypi.douban.com/simple/
中国科学技术大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中科技大学 https://pypi.hustunique.com/

pip 安装包时,首先“下载Cache的位置路径”与 “安装的路径” 是不同的,注意!
pip 安装包的位置路径
:查看安装路径:python -m site

  在Win10下,启动 Cmd 使用用户(一般用户、管理员Administrator)不同,安装位置不同!

 

你可能感兴趣的:(Python 安装与命令行参数 ,Pip 的命令参数--官方文档)