前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Python开发环境搭建

Python开发环境搭建

作者头像
py3study
发布2020-01-15 00:58:27
1.5K0
发布2020-01-15 00:58:27
举报
文章被收录于专栏:python3python3

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

代码语言:javascript
复制
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

2、安装Python

[root@ipython ~]# pyenv install 3.5.2   安装Python3.5.2版本

默认该过程很慢,解决办法如下 下载Python3.5.2版本

放到~/.pyenv/cache目录即可。修改~/.pyenv/plugins/python-build/share/python-build/3.5.2文件

代码语言:javascript
复制
[root@ipython ~]# cd .pyenv/plugins/python-build/share/python-build/
[root@ipython 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


[root@ipython ~]# pyenv versions
  system
* 3.5.2 (set by /root/.python-version)
[root@ipython ~]# 
[root@ipython ~]# pyenv local 3.5.2
[root@ipython ~]# 
[root@ipython ~]# python -V
Python 3.5.2
[root@ipython ~]# python 
Python 3.5.2 (default, Nov  5 2016, 20:24:14) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
wKioL1gepCiCPPXeAAAbbhTjQ_o358.png
wKioL1gepCiCPPXeAAAbbhTjQ_o358.png

3、安装ipython

代码语言:javascript
复制
[root@ipython ~]# mkdir ~/.pip
[root@ipython .pip]# cat pip.conf 
[global]
timeout = 6000
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com

[root@ipython ~]# pip install --upgrade pip
[root@ipython ~]# pip install ipython
[root@ipython ~]# ipython
wKiom1geos3y0ugHAABKKOVehlg529.png
wKiom1geos3y0ugHAABKKOVehlg529.png

4、安装jupyter

[root@ipython ~]# pip install jupyter 

[root@ipython ~]# jupyter notebook --ip=172.16.80.128

打开浏览器访问测试

wKiom1geozGw_QzZAAC7ZAAQ4R0052.png
wKiom1geozGw_QzZAAC7ZAAQ4R0052.png

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

wKioL1geo5nRafdiAACqb7pO28k841.png
wKioL1geo5nRafdiAACqb7pO28k841.png
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-06-25 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档