一、Python下载安装
1.Python下载地址 https://www.python.org/downloads/ ,多版本可供选择
以3.6.6为例,点击之后拖动到最后的File,根据操作系统等选择下载版本
2. 安装
下面默认就好
3.安装完之后可以在命令窗口中输出python查询安装是否成功
4.环境变量配置
(1)使用快捷键windows+r,输入sysdm.cpl,敲击回车进入。
(2)点击高级。选择最底部的环境变量。
(3)在系统环境变量中点击编辑。
(4)定义一个变量名称。点击浏览文件。找到需要添加变量的软件所在的路径。D:\python\python.exe;D:\python\Scripts
二、pycharm下载安装
1. pycharm下载地址https://www.jetbrains.com/pycharm/download/#section=windows
第一个是专业版,是收费的,功能比较全
第二个是社区版,是免费的,功能比较少
点击download即可下载,
下载后如下
2.安装
下载后,直接运行
3.安装成功后,激活
将下面激活码粘贴到框中
IZHFJ8AXWI-eyJsaWNlbnNlSWQiOiJJWkhGSjhBWFdJIiwibGljZW5zZWVOYW1lIjoi6I635Y+W77yaIGxvb2tkaXbjgIJjb20iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiIiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAyMC0xMS0xOCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMjAtMTEtMTgiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDIwLTExLTE4IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSTSIsInBhaWRVcFRvIjoiMjAyMC0xMS0xOCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMTEtMTgiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlJTViIsInBhaWRVcFRvIjoiMjAyMC0xMS0xOCI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UW596Lbomsg8qVve6euqsrFicYkIIuUu4zYPndJwfe0YkS5nY72SHnNdbPhEnN8wcB2Kz+OIG0lih3yz5EqFhld03bGp222ZQCIghCTVL6QBNadGsiN/lWLl4JdR3lJkZzlpFdiHijoVRdWeSWqM4y0t23c92HXKrgppoSV18XMxrWVdoSM3nuMHwxGhFyde05OdDtLpCv+jlWf5REAHHA201pAU6bJSZINyHDUTB+Beo28rRXSwSh3OUIvYwKNVeoBY+KwOJ7WnuTCUq1meE6GkKc4D/cXmgpOyW/1SmBz3XjVIi/zprZ0zf3qH5mkphtg6ksjKgKjmx1cXfZAAX6wcDBNaCL+Ortep1Dh8xDUbqbBVNBL4jbiL3i3xsfNiyJgaZ5sX7i8tmStEpLbPwvHcByuf59qJhV/bZOl8KqJBETCDJcY6O2aqhTUy+9x93ThKs1GKrRPePrWPluud7ttlgtRveit/pcBrnQcXOl1rHq7ByB8CFAxNotRUYL9IF5n3wJOgkPojMy6jetQA5Ogc8Sm7RG6vg1yow==
4. 接下来就可以正常使用pycharm
5.在settings中设置. File--->Settings
设置字体大小
设置背景色,选好之后,不要忘记点击OK哦!
最终,效果如下。字体适中,背景色比较漂亮,而且不会伤害眼睛。哈哈,本人非常满意!你也可以根据自身情况进行选择啦!
需要什么库,直接在终端使用pip3命令下载即可
至此,Python和Pycharm都已经安装好。
永久激活pycharm
step1:下载jar包: 此jar包的目的就是让截获截止时间并骗过pycharm;
step2:下载完毕后, 将其放入pycharm在你本地的安装目录bin下。并且修改两个以 vmoptions为结尾的启动文件如图所示:
并且在两个文件后追加
-javaagent:E:\software\PyCharm 2019.1\bin\JetbrainsCrack-2.6.10-release-enc.jar
注意:自己的安装目录
step3:重启pycharm 如需激活码,可填写
IZHFJ8AXWI-eyJsaWNlbnNlSWQiOiJJWkhGSjhBWFdJIiwibGljZW5zZWVOYW1lIjoi6I635Y+W77yaIGxvb2tkaXbjgIJjb20iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIj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 点击 pycharm的help->about查看:
pip
安装python包基本都是使用pip
pip --help
pip使用实例
搜索包;
$ pip search redis
安装redis包;
$ pip install redis
安装指定版本;
$ pip install redis==2.10.5
升级包;
$ pip install --upgrade pip
查看redis驱动信息;
$ pip show redis
卸载redis驱动;
$ pip uninstall redis
列出所有安装包;
$ pip list
列出待更新包;
$ pip list --outdate
这里特别关注一下install命令,查看一下帮助:pip help install
$ pip help install
Usage:
pip install [options] [package-index-options] ...
pip install [options] -r [package-index-options] ...
pip install [options] [-e] ...
pip install [options] [-e] ...
pip install [options] ...
........
下面说几个重要参数:
升级一个软件包
$ pip install --upgrade pip
批量安装软件包,使用-r指定一个文本,在文本中指定软件包名称,也可以指定软件包版本。
$ pip install -r requirements.txt
修改pip的镜像地址。
$ pip install -i https://mirrors.aliyun.com/pypi/simple/ redis
由于某些不可抗因素,Python官方的包在国内有时无法访问或出现网络不稳定现象。为了解决这个问题就需要将Pip中自带的源地址修改为镜像地址。
目前收集的比较好的镜像地址有:
http://pypi.douban.com/simple/
http://mirrors.aliyun.com/pypi/simple/
如果不适用加密方式访问的话就需要指定信任此主机。
$ pip install --trusted-host mirrors.aliyun.com -i http://mirrors.aliyun.com/pypi/simple/ redis
PIP配置文件
另外,PIP支持配置文件pip.conf,可以创建在/etc/pip.conf,或者在~/.pip/pip.conf。
$ cat /etc/pip.conf
[global]
timeout = 60
trusted-host=mirrors.aliyun.com
index-url=http://mirrors.aliyun.com/pypi/simple/
更多的参数使用可以看pip help [command]。
问题:在PyCharm写代码时,光标变粗了,并且按退格键会删除编写的内容。
原因:光标进入了改写状态。
解决方法:按一下鼠标Insert键就好了。
//www.greatytc.com/p/050cb7a4ab09
https://blog.csdn.net/qq_42631707/article/details/103424636
https://www.cnblogs.com/lyck/p/13776268.html
关于镜像源的问题:
https://zhuanlan.zhihu.com/p/105207260?utm_source=wechat_session