日常使用PHP开发较多,但是有些地方PHP的语言的瓶颈就显露出来了,例如,同样是抓取一个网站的内容,使用PHP需要较为复杂的正则匹配,效率较为低下。python具有丰富的类库,拿过来直接可以使用,功能强大,飞一样的感觉。学习与使用python就变得尤为的重要

  安装

  在本地我安装的是最新的python版本3.7.0     ,有些人会纠结到底是使用python2还是python3呢,虽然两个版本相差的较多,但是基本的一些东西和思想是一致的。所以了解了这些,我们是不是可以不拘于表象而是直击要害  --》学习并掌握这门技术才是硬道理!!!

   我为什么选择使用python3而不是python2呢?我一直是喜爱追求新的东西,当然编程也不例外,就好像PHP出了7之后,开发自己项目的时候总是搭建一个最新的环境使用最新的PHP语法与特性。编程这个行业总是在不断更新迭代中,也是向着好的地方发展,我相信新的一定有一定的道理,一定有胜于之前的利器!!!废话不多说,Go

  从官网上选择下载适合自己电脑的python版本

    选择版本:https://www.python.org/downloads/release/python-370/  -》 Windows x86-64 web-based installer    下载安装即可(添加path路径)

  使用

    

  交互模式:

python -V   // 查看版本

  

python      //直接运行python命令即进入交互模式

Ctrl+ d  或者 quit()   //退出

  

  

  PIP的安装:

pip就像是centos中的yum,可以方便进行相关插件,模块的安装

1)下载:  https://pypi.org/project/pip/#history

2)解压到一个目录下,执行命令进行安装

python setup.py install

3)这个时候,就可以使用pip相关命令

Usage:
pip3 <command> [options] Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands. General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user
configuration.
-v, --verbose Give more output. Option is additive, and can be used up to times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to times
(corresponding to WARNING, ERROR, and CRITICAL logging levels).
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--retries <retries> Maximum number of retries each connection should attempt (default
times).
--timeout <sec> Set the socket timeout (default seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe,
(b)ackup, (a)bort).
--trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any
HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file containing the private key
and the certificate in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine whether a new version of pip
is available for download. Implied with --no-index.
--no-color Suppress colored output

注意: 如果是安装了一个python的版本,那么pip和pip3都可以进行使用,效果是相同的,这个是因为为了使用不同python版本的时候的区分, 例如:默认pip指向python2, 那么pip3则指向python3

4)常用命令

#安装包
pip install package #升级包,可以使用-U或 --upgrade
pip install -U package #卸载包
pip uninstall package #列出已安装的包
pip list

python安装与使用(Windows)的更多相关文章

  1. python 安装配置(windows)

    在 Windows 上, 安装 Python 有两种选择. ActiveState 制作了一个 Windows 上的 Python 安装程序称为 ActivePython, 它包含了一个完整的 Pyt ...

  2. python安装教程(Windows系统,python3.7为例)

    1. 在python的官网下载python对应版本:https://www.python.org/downloads/windows/ 64位下载Windows x86-64 executable i ...

  3. python安装pyeda库--windows版

    本页介绍了如何购买自己的PyEDA闪亮副本.PyEDA项目的主要目标是成为主流的Python软件包,并遵守社区中遵守的大多数约定. 支持平台 PyEDA支持Windows以及任何带有C编译器的平台.作 ...

  4. python安装使用(windows)

    安装 参考:http://scrapy-chs.readthedocs.io/zh_CN/0.24/intro/install.html#scrapy 用到的文件:https://share.weiy ...

  5. 转:python安装pycrypto

    from: http://ljhzzyx.blog.163.com/blog/static/3838031220136592824697/   在windows下用一下开源工具就是悲催,如题pytho ...

  6. python安装(windows)

    1.python安装(windows) 1.1 下载安装包 https://www.python.org/downloads/ 1.2 安装 python2.7默认安装路径:C:\python27 注 ...

  7. windows下python安装paramiko

    Python中使用SSH需要用到OpenSSH,而OpenSSH依赖于paramiko模块,而paramiko模块又依赖于pycrypto模块,因此要在Python中使用SSH,则需要先安装模块顺序是 ...

  8. windows 下的python 安装pycrypto

    一般在官方网站下载pycrypto: https://www.dlitz.net/software/pycrypto/   然后使用命令就可以安装成功了: python setup.py build  ...

  9. Python编程软件的安装与使用——Windows、Linux和Mac

    Python版本:3.6.2  操作系统:Windows  作者:SmallWZQ 最近,有读者透露:Python软件如何安装?为什么自己安装的软件会有各种"奇怪"的问题?据此,本 ...

  10. Windows下的Python安装与环境变量的配置

    Windows下的Python安装与环境变量的配置 第一步:python下载: Python安装包下载地址:http://www.python.org/ 第二步:python安装: 双击下载包,进入P ...

随机推荐

  1. 简述KVM架构和Xen架构

    暑假最后一篇更新,因为,,,明天我就回学校了. 以下均为个人理解,如果有不对的地方还望各位dalao不吝赐教. 虚拟化 虚拟化是通过Hypervisor程序实现的,Hypervisor的作用是将硬件虚 ...

  2. eshint的配置

    { "strict" : "implied", //文件里面使用"use strict" "undef" : true, ...

  3. DP 魔族密码 LIS

    题目描述 风之子刚走进他的考场,就…… 花花:当当当当~~偶是魅力女皇——花花!!^^(华丽出场,礼炮,鲜花) 风之子:我呕……(杀死人的眼神)快说题目!否则……-_-### 花花:……咦好冷我们现在 ...

  4. Scrapy 框架 分布式 爬虫

    分布式 爬虫 scrapy-redis 实现 原生scrapy 无法实现 分布式 调度器和管道无法被分布式机群共享 环境安装 - pip install scrapy_redis 导包:from sc ...

  5. linux学习(杂项)

    内存使用情况 磁盘使用情况 负载情况 查看cpu 可视化磁盘 循环创建文件夹 删除文件夹 移动文件 gg行首 G行尾 dd删除一行 u恢复 yy复制一行 p粘贴一行 enter下翻 less 与 mo ...

  6. vue与jquey

    vue与jquey jQuery是使用选择器($)选取DOM对象,对其进行赋值.取值.事件绑定等操作,其实和原生的HTML的区别只在于可以更方便的选取和操作DOM对象,而数据和界面是在一起的.比如需要 ...

  7. y7000笔记本 darknet-yolo安装与测试(Ubuntu18.04+Cuda9.0+Cudnn7.1)

    环境配置看上一贴 https://www.cnblogs.com/clemente/p/10386479.html 1 安装darknet 1-1 克隆darknet repo git clone h ...

  8. Home Assistant-自动化设备

    触发器(trigger) 条件(condition) 动作(action) 自动化中的模板(template) 触发器(trigger) 时间(time)触发器时间触发器在指定的时间触发规则,可以是某 ...

  9. argparse模块

    argparse模块是的编写用户友好的命令行接口非常容易.程序只需定义好它要求的参数,然后argparse将负责如何从sys.argv中解析出这些参数.argparse模块还会自动生成帮助和使用信息并 ...

  10. 洛谷 P2802 回家

    题目链接 https://www.luogu.org/problemnew/show/P2802 题目描述 小H在一个划分成了n*m个方格的长方形封锁线上. 每次他能向上下左右四个方向移动一格(当然小 ...