1、安装git
Windows里安装git
官网下载
点击安装程序进行安装
Linux里安装git
yum install git -y
[root@aliyun ~]# git version
git version 1.8.3.1
2、安装python3
Linux系统里自带python(不同版本的操作系统带的python版本不一样)
yum install epel-releaseyum install python36yum install python36-devel
[root@aliyun ~]# python --version
Python 2.7.5
[root@aliyun ~]# python3 --version
Python 3.6.8
可以查看有没有安装好python3
[root@aliyun ~]# rpm -qa |grep python
libsemanage-python-2.5-14.el7.x86_64
python3-pip-9.0.3-8.el7.noarch
python-rpm-macros-3-34.el7.noarch
python-decorator-3.4.0-3.el7.noarch
newt-python-0.52.15-4.el7.x86_64
python-linux-procfs-0.4.11-4.el7.noarch
python-chardet-2.2.1-3.el7.noarch
python-pycurl-7.19.0-19.el7.x86_64
python-2.7.5-92.el7_9.x86_64
dbus-python-1.1.1-9.el7.x86_64
python-IPy-0.75-6.el7.noarch
policycoreutils-python-2.5-34.el7.x86_64
python3-setuptools-39.2.0-10.el7.noarch
python3-3.6.8-18.el7.x86_64
python-srpm-macros-3-34.el7.noarch
python3-rpm-macros-3-34.el7.noarch
python3-devel-3.6.8-18.el7.x86_64
python-gobject-base-3.22.0-1.el7_4.1.x86_64
python-schedutils-0.4-6.el7.x86_64
python-configobj-4.7.2-7.el7.noarch
libselinux-python-2.5-15.el7.x86_64
python-urlgrabber-3.10-10.el7.noarch
python-slip-dbus-0.4.0-4.el7.noarch
libxml2-python-2.9.1-6.el7_9.6.x86_64
python-kitchen-1.1.1-5.el7.noarch
python-libs-2.7.5-92.el7_9.x86_64
python-firewall-0.6.3-13.el7_9.noarch
rpm-python-4.11.3-48.el7_9.x86_64
audit-libs-python-2.8.5-4.el7.x86_64
python3-libs-3.6.8-18.el7.x86_64
python3-rpm-generators-6-2.el7.noarch
python-iniparse-0.4-9.el7.noarch
python-slip-0.4.0-4.el7.noarch
python-perf-3.10.0-1160.90.1.el7.x86_64
python-pyudev-0.15-9.el7.noarch
输入python3
[root@aliyun ~]# python3
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@aliyun ~]#
windows里安装python3
下载地址:
https://www.python.org/ftp/python/3.6.5/python-3.6.5-amd64.exe
安装python36
exe安装: 注意修改目录、环境变量--》计算机-属性-高级系统设置-环境设置-系统环境变量-path --》添加你的python安装路径,添加好之后重新进入cmd(按徽标+r)
安装路径:C:/python36 --》安装路径可以自定,但注意不要包含中文或空格等特殊字符
解决安装慢的问题:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
C:\Users\admin>pip install six
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: six in c:\users\admin\appdata\local\programs\python\python39\lib\site-packages (1.16.0)
pip的使用:
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.
cache Inspect and manage pip's wheel cache.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
debug Show information useful for debugging.
help Show help for commands.
按win+r进入cmd,输入python。
pip的使用
使用pip命令安装requests库
C:\Users\wei>pip install requests
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: requests in c:\users\wei\appdata\local\programs\python\python39\lib\site-packages (2.26.0)
Requirement already satisfied: charset-normalizer~=2.0.0; python_version >= "3" in c:\users\wei\appdata\local\programs\python\python39\lib\site-packages (from requests) (2.0.3)
Requirement already satisfied: idna<4,>=2.5; python_version >= "3" in c:\users\wei\appdata\local\programs\python\python39\lib\site-packages (from requests) (3.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\wei\appdata\local\programs\python\python39\lib\site-packages (from requests) (2021.5.30)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\wei\appdata\local\programs\python\python39\lib\site-packages (from requests) (1.26.6)
WARNING: You are using pip version 20.2.3; however, version 23.1.2 is available.
You should consider upgrading via the 'c:\users\wei\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
安装慢的问题,可以把源换成国内源
C:\Users\wei>pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
C:\Users\wei>pip install six
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: six in c:\users\wei\appdata\local\programs\python\python39\lib\site-packages (1.16.0)
WARNING: You are using pip version 20.2.3; however, version 23.1.2 is available.
You should consider upgrading via the 'c:\users\wei\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
3、安装 pycharm:IDE (集成开发环境)
1. 下载地址官网:http://www.jetbrains.com/pycharm/2. 安装社区版:免费使用,不用激活专业版:功能更丰富,需要激活 优点:界面友好、调试、语法高亮、Project管理、代码跳转、智能提示、自动完成、单元测试、版本控制等。
pycharm 下载后进行解压,点击安装程序进行安装,安装路径修改一下,其他保持默认。
![](https://i-blog.csdnimg.cn/blog_migrate/872a3b37fe1f68e3cf5207df741fd3a4.png)
pycharm里安装库