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 ...
随机推荐
- 数据:ContentProvider类
一个程序可以通过实现一个Content provider的抽象接口将自己的数据完全暴露出去,而且Content providers是以类似数据库中表的方式将数据暴露. Content provid ...
- TTTTTTTTTTTTT LA 2191 树状数组 稍修改
题意:给出n个数字,操作有修改(S)和输出区间和(M). #include <iostream> #include <cstdio> #include <cstring& ...
- (46)LINUX应用编程和网络编程之一Linux应用编程框架
3.1.1.应用编程框架介绍 3.1.1.1.什么是应用编程 (1)整个嵌入式linux核心课程包括5个点,按照学习顺序依次是:裸机.C高级.uboot和系统移植.linux应用编程和网络编程.驱动. ...
- Hashtable 和 HashMap 的区别是:
HashMap 是内部基于哈希表实现,该类继承AbstractMap,实现Map接口 Hashtable 线程安全的,而 HashMap 是线程不安全的 Properties 类 继承了 Hashta ...
- android自定义camera以及uri和文件路径之间的转换
相对直接调用系统的camera,这种方法使用得相对还少一些.根据api文档,步骤如下: 定义一个预览类 可以参照<android高薪之路>这本书上面,有这种方法的一种完整实现 而对应的ac ...
- SVN appears to be part of a Subversion 问题心得
昨天更新了下项目,但同时又增加了一个Java工程,我就在本地单独导出到workspace同目录下:结果第二天提交代码的时候,提示如下错误 svn: E155021: The path 'xxx' ap ...
- Detectron系统实现了最先进的物体检测算法https://github.com/facebookresearch/Detectron
,包括Mask R-CNN. 它是用Python编写的,支持Caffe2深度学习框架. 不久前,FAIR才开源了语音识别的工具wav2letter,戳这里看大数据文摘介绍<快讯 | Facebo ...
- 生成base64位图片验证码
import org.springframework.util.Base64Utils; import javax.imageio.ImageIO; import java.awt.*; import ...
- 神经网络学习笔记一——Neural Network
参考自http://deeplearning.stanford.edu/wiki/index.php/Neural_Networks 神经元模型 h(x)= f(W'x)f(z)一般会用sigmoid ...
- delphi xe2 64位嵌入汇编问题 https://bbs.csdn.net/topics/390333981
Function xxx(xxx):xxx;assembler;asm XOR RAX , RAX ...end;这样的可以. 0 0 引用 ・ 举报 ・ 管理 5t4rk 回复于 2013- ...