码迷,mamicode.com
首页 > 编程语言 > 详细

linux python开发环境搭建

时间:2019-01-29 15:01:33      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:project   mysql   open   mod   usr   eve   configure   pip   event   

  

1. centos6.4

准备:
yum -y install gcc*
yum -y install openssl-devel
yum install libtermcap-devel ncurses-devel libevent-devel readline-devel


tar -zxvf Python2.7.11.tgz /usr/local/python27

./configure --prefix=/usr/local/python27

vim ./Module/Setup

1.
# socket line above, and possibly edit the SSL variable:
SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto

2.
readline readline.c -lreadline -ltermcap

make $$ make install


修改系统默认的python2..6.6 --2.7.11

cd /usr/bin/
rm python

ln -s /usr/local/python27/bin/python /usr/bin/python

vim /usr/bin/yum ##/usr/bin/python --> /usr/bin/python2.6


ipython ##交互式的开发工具
virtualenv ##沙盒工具 python setup.py install ln -s ...

virtualenv project1
source ./project1/bin/acti..

pip setuptools ##
pip install pymysql
pip install requests

 

linux python开发环境搭建

标签:project   mysql   open   mod   usr   eve   configure   pip   event   

原文地址:https://www.cnblogs.com/ryan-ning/p/10333848.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!