212121 发表于 2016-11-7 09:33:01

Python各种开发环境搭建

1、pyenv   安装
地址https://github.com/yyuu/pyenv-installer

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash

and remove these three lines from .bashrc
export PATH="~/.pyenv/bin:$PATH"eval "$(pyenv init -)"eval "$(pyenv virtualenv-init -)"2、安装Python
# pyenv install 3.5.2   安装Python3.5.2版本
默认该过程很慢,解决办法如下 下载Python3.5.2版本
放到~/.pyenv/cache目录即可。修改~/.pyenv/plugins/python-build/share/python-build/3.5.2文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# cd .pyenv/plugins/python-build/share/python-build/
# vim 3.5.2

#require_gcc
install_package "openssl-1.0.2g" "https://www.openssl.org/source/openssl-1.0.2g.tar.gz#b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33" mac_openssl --if has_broken_mac_openssl
install_package "readline-6.3" "https://ftpmirror.gnu.org/readline/readline-6.3.tar.gz#56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43" standard --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.5.2" "~/.pyenv/cache/Python-3.5.2.tar.gz" ldflags_dirs standard verify_py35 ensurepip
else
install_package "Python-3.5.2" "~/.pyenv/cache/Python-3.5.2.tar.gz" ldflags_dirs standard verify_py35 ensurepip
fi


# pyenv versions
system
* 3.5.2 (set by /root/.python-version)
#
# pyenv local 3.5.2
#
# python -V
Python 3.5.2
# python
Python 3.5.2 (default, Nov5 2016, 20:24:14)
on linux
Type "help", "copyright", "credits" or "license" for more information.






3、安装ipython

1
2
3
4
5
6
7
8
9
10
# mkdir ~/.pip
# cat pip.conf

timeout = 6000
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com

# pip install --upgrade pip
# pip install ipython
# ipython





4、安装jupyter
# pip install jupyter

# jupyter notebook --ip=172.16.80.128

打开浏览器访问测试


5、pycharm安装配置过程略过,简单截图如下


页: [1]
查看完整版本: Python各种开发环境搭建