install stackless python on ubuntu
前言
我准备用stackless模拟游戏玩家登陆/注册等行为,测试游戏服务器的性能。
但是在安装stackless的过程中遇到了很多问题,特此记录下来,也分享给需要的朋友。
关于stackless
Stackless Python is an experimental implementation of the Python language.
Stackless was designed from the start to overcome the limitations of cPython's Global Interpreter Lock by using tasklets, which implement functions as microthreads.
environment
(1) Ubuntu 12.04.5 LTS (GNU/Linux 3.5.0-23-generic x86_64)
(2) Python 2.7.3 [GCC 4.6.3] on linux2
Install
First install the required libraries and get stackless itself:
sudo apt-get install libreadline-dev cd /tmp wget http://www.stackless.com/binaries/stackless-273-export.tar.bz2 bunzip2 stackless-273-export.tar.bz2 tar xf stackless-273-export.tar
install stackless:
cd /tmp/stackless-273-export/ ./configure --prefix=/opt/stackless --enable-unicode=ucs4 make
sudo make install
如果./configure 报错,首先检查是否已安装gcc,安装命令sudo apt-get install gcc
Now it's time to link your standard (CPython) packages so that they can be used with stackless:
sudo ln -s /usr/lib/python2.7/dist-packages/ /opt/stackless/lib/python2.7/dist-packages sudo ln -s /usr/local/lib/python2.7/dist-packages/ /opt/stackless/lib/python2.7/dist-packages sudo ln -s /opt/stackless/bin/python /usr/bin/stackless
edit the paths in the site.py file.
At about line 302, edit the file to look like this. It's the second site-packages.append bit we're adding here:
sudo vi /opt/stackless/lib/python2.7/site.py line 302:
elif os.sep == '/':
sitepackages.append(os.path.join(prefix, "lib",
"python" + sys.version[:3],
"site-packages"))
sitepackages.append(os.path.join(prefix, "lib",
"python" + sys.version[:3],
"dist-packages"))
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
That should be it! Let's test it:

check symbolic link

Install success.
about stackless python
Introduction to Concurrent Programming with Stackless Python
english: (1) http://www.stackless.com/
(2) http://www.grant-olson.net/files/why_stackless.html
(3) https://bitbucket.org/stackless-dev
中文:http://gashero.yeax.com/?p=30
install stackless python on ubuntu的更多相关文章
- Install LAMP Stack On Ubuntu 16.04
原文:http://www.unixmen.com/how-to-install-lamp-stack-on-ubuntu-16-04/ LAMP is a combination of operat ...
- python mongodb ubuntu
mongodb install: sudo apt-get install mongodb Install pip 1. $ sudo apt-get install python-pip pytho ...
- Install Google Pinyin on Ubuntu 14.04
Install Google Pinyin on Ubuntu 14.04 I've been spending more and more time on Ubuntu and I'm not us ...
- HOWTO install Oracle 11g on Ubuntu Linux 12.04 (Precise Pangolin) 64bits
安装了Ubuntu 12.04 64bit, 想在上面安装Oracle 11gr2,网上找了好多文档都没成功,最后完全参考了MordicusEtCubitus的文章. 成功安装的关键点:install ...
- Install a Redmine on Ubuntu system
# How to install a Redmine on Ubuntu system Ref to: https://www.linode.com/docs/applications/project ...
- How do you install Google Chrome on Ubuntu?
https://askubuntu.com/questions/510056/how-to-install-google-chrome sudo apt-get install chromium-br ...
- Install eclipse ns3 in ubuntu 14.04
1. NS3 install 参考NS3 tutorial即可. 2.eclipse 2.1下载 下载地址:http://www.eclipse.org/downloads/ ...
- 【转载】Stackless Python并发式编程介绍[已校对版]
Stackless Python并发式编程介绍[已校对版] 作者: Grant Olson 电子邮件: olsongt@verizon.net 日期: 2006-07-07 译者: ...
- install dns server on ubuntu
参考 CSDN/Ubuntu环境下安装和配置DNS服务器 在 Ubuntu 上安裝 DNS server Install BIND 9 on Ubuntu and Configure It for U ...
随机推荐
- JAVA语言课堂测试源代码及使用截图
1源代码 第一部分 package 开学测试.java;class ScoreInformation {String stunumber;String name;double mathematicss ...
- QT 信号槽 异步事件驱动 单线程 多并发
利用好Qt 模块的异步信号槽,单线程同样可是实现很强悍的的并发能力.应付正常的功能是足够的. 需要注意的是:该模式本质上为 单线程 事件驱动异步模式,所以需要做的事优化你的业务代码构架以应付性能与并发 ...
- 《Effective Java》读书笔记 - 6.枚举和注解
Chapter 6 Enums and Annotations Item 30: Use enums instead of int constants Enum类型无非也是个普通的class,所以你可 ...
- jieba(结巴)常用方法
python jieba库的基本使用 第一步:先安装jieba库 输入命令:pip install jieba jieba库常用函数: jieba库分词的三种模式: 1.精准模式:把文本精准地分开 ...
- 在性能测试时使用nmon进行监控服务器性能
在使用Jmeter进行性能测试,可以使用nmon进行服务器的监控. 一.nmon说明 nmon分为工具包和分析包(nmonanalyser) nmon安装很简单,根据服务器版本,下载相应的版本后,进行 ...
- 中国MOOC_零基础学Java语言_第2周 判断
浮点数判断大小 public class Main { public static void main(String[] args) { double a = 1.0; double b = 0.1 ...
- C 语言中的关键字 - 数据类型、数据修饰符及逻辑结构
C 语言中有 32 个关键字.这是留个编译器用的特殊字符串,用户不可以使用. 特殊关键字 sizeof 和 return 是 C 语言中的两个特殊关键字. sizeof sizeof 用于计算变量所占 ...
- win10在文件夹下打开powershell
快捷键win+R,输入cmd可以直接打开终端命令行窗口 在文件夹下打开终端命令行端口: 在需要的文件夹目录下,按住shift键,在空白处右击,选择在此处打开powershell窗口,即可进行终端命令行 ...
- 动态网页基础——JSP
WEB项目的目录结构 META-INT WEB-INF 对外都是不可访问的,不可把index.jsp/index.html 放这 JSP JSP是为了简化Servlet的工作出现的替代品,Servl ...
- WEB技术发展简史
一.Web技术发展的第一阶段——静态文档 第一阶段的Web,主要是用于静态Web页面的浏览.用户使用客户机端的Web浏览器,可以访问Internet上各个Web站点,在每一个站点上都有一个主页(Hom ...