dba_aj@163.com
2018年8月25日星期六
Python 安装
1、源码安装Python3.6
1.1 Centos6 源码安装python 3.6
1.2 Ubuntu16 源码安装python3
2. pip安装和换源
2.1 安装源码Python直接带了pip
2.2 centos 安装pip3
2.3 ubuntu 安装pip
2.4 pip换源
2.5 安装软件
3. pycharm 安装注册
3.1 window pycharm 安装
3.2 linux pycharm
4. sublime test3 安装
4.1 安装和激活
4.2 package control
4.3 插件安装
4.4 setting
1、源码安装Python3.6
1.1 Centos6 源码安装python 3.6
1.2 Ubuntu16 源码安装python3
2. pip安装和换源
2.1 安装源码Python直接带了pip
2.2 centos 安装pip3
2.3 ubuntu 安装pip
2.4 pip换源
2.5 安装软件
3. pycharm 安装注册
3.1 window pycharm 安装
3.2 linux pycharm
4. sublime test3 安装
4.1 安装和激活
4.2 package control
4.3 插件安装
4.4 setting
1、源码安装Python3.6
1.1 Centos6 源码安装python 3.6
# Centos6 依赖
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum clean all
yum repolist
$ yum groupinstall 'Development Tools'
$ yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
1.2 Ubuntu16 源码安装python3
#ububtu依赖
apt install build-essential libssl-dev libevent-dev libjpeg-dev libxml2-dev libxslt-dev
#上传安装包
apt-get install lrzsz
cd /usr/local/src/
下载或者上传python源码安装包
tar -xf Python-3.6.3.tar.xz -C /usr/local/src/
#安装
mkdir /usr/local/python3
./configure --prefix=/usr/local/python3
make ; make install
Successfully installed pip-9.0.1 setuptools-28.8.0 #安装完成时,提示还安装了pip9.0.1
#pip3更新
# ./pip3 --version
pip 9.0.1 from /usr/local/python3/lib/python3.6/site-packages (python 3.6)
#pip 换源
下面有
#pip3更新
# ./pip3 install --upgrade pip
2. pip安装和换源
2.1 安装源码Python直接带了pip
2.2 centos 安装pip3
yum install python-pip –y
yum -y install python-setuptools && easy_install pip && pip install --upgrade pip
2.3 ubuntu 安装pip
#1.更新系统包
sudo apt-get update
sudo apt-get upgrade
#2.安装pip
apt-get install python-pip
#3.安装pip3
apt-get install python3-pip
2.4 pip换源
#linux下,修改 ~/.pip/pip.conf (没有就创建一个), 修改 index-url至tuna,内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
#windows下,直接在user目录中创建一个pip目录,如:C:Usersxxpip,新建文件pip.ini,内容如下
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
2.5 安装软件
pip3 install ipython
- ipython集成了部分shell的功能,可以之间使用linux命令和tab补齐等小功能,记录输入命令的条数等人性化的功能。
- 其实底层去解释python语句的时候,还是调用python的。ipython相当于python的一个解释器,交互工具。
- 安装了pip之后,安装ipython非常简单,确定能联网
http://www.cnblogs.com/yuechaotian/archive/2013/06/03/3115472.html
pip3 install requests
pip3 install paramiko
pip3 install pymysql
3. pycharm 安装注册
3.1 window pycharm 安装
安装201803版本
#编辑 C:WindowsSystem32driversetchosts, 添加以下
0.0.0.0 account.jetbrains.com
0.0.0.0 www.jetbrains.com
3.2 linux pycharm
安装201803版本``
链接: https://pan.baidu.com/s/1btk7XL5xePznqE78eoDhgg 提取码: szg8 复制这段内容后打开百度网盘手机App,操作更方便哦
复制到bin目录下
对pycharm64.vmoptions,pycharm.vmoptions 最后添加文件路径
-javaagent:/home/aj/program/pycharm-2018.3.2/bin/JetbrainsIdesCrack-3.4-release-enc.jar
4. sublime test3 安装
4.1 安装和激活
windows : C:WindowsSystem32driversetc
mac: sudo vim /etc/hosts
127.0.0.1 license.sublimehq.com
127.0.0.1 45.55.255.55
127.0.0.1 45.55.41.223
4.2 package control
windows :
- 下载链接: https://pan.baidu.com/s/1w_zgapKNSxHE297qW9XHfg 提取码: 9958
- 复制Package Control.sublime-package 到目录“Installed Packages” [ Preferences-->Browse Packages --> 上一级Installed Packages
- 复制channel_v3.json到磁盘并配置目录,Preferences > Package Settings > Package Control > Settings - User.
或者添加这个
"channels": ["https://raw.githubusercontent.com/HBLong/channel_v3_daily/master/channel_v3.json"],
{
"bootstrapped": true,
"channels": ["C:/Users/dba_a/AppData/Roaming/Sublime Text 3/json/channel_v3.json"],
"installed_packages":
[
"Package Control"
]
}
{
"bootstrapped": true,
"channels": ["https://raw.githubusercontent.com/HBLong/channel_v3_daily/master/channel_v3.json"],
"installed_packages":
[
"Package Control"
]
}
4.3 插件安装
- SQL美化工具
ctrl + P --- install package -- SqlBeautifier
ctrl k,ctrl f
MAC: Command K + Command F
- 文件比较
1. 下载 https://www.sublimerge.com/packages/ST3/latest/Sublimerge%203.sublime-package
2. Go to Preferences > Browse Packages...
3. Go one folder up
4. Go to Installed Packages
5. Copy the package to that directory
6. Restart Sublime Text
4.4 setting
{
"update_check": false,
}