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 ...
 
随机推荐
- 使用ros_driver运行velodyne16线激光雷达
			
一.使用ros_driver运行VLP16 推荐网址: http://blog.csdn.net/littlethunder/article/details/51920681 https://www. ...
 - 苹果cms开启防红跳转后,提示模板文件不存在解决方法
			
1,苹果cms开启防红跳转后,提示模板文件不存在(如下图)这是因为你使用的模板里面缺少苹果cms自带的防红跳转模板导致,遇到这种状况后需要把苹果cms默认自带的( template/default_p ...
 - 深入浅出mysql笔记---0、序
			
深入浅出mysql笔记---0.序 一.总结 一句话总结: 心得:买书之前建议先找找电子书,纸质书太难带了 1.开源作用? 开源对mysql的发展至关重要 2.mysql在2002年就全面支持了事务, ...
 - md5sum c实现
			
#include <stdio.h>#include <ctype.h> #define STR_VALUE(val) #val#define STR(name) STR_VA ...
 - 微信小程序 API 数据缓存
			
微信小程序 数据缓存 (类似于 cookie) wx.setStorage() 将数据存储在本地缓存中制定的 key 中.会覆盖掉原来该 key 对应的内容,数据存储生命周期跟小程序本身一致,即除用户 ...
 - virt-manager 使用 shh 远程访问配置方法
			
1.下载安装 Xming+Xshell 或者 Xming+putty,启动Xming服务 Xming下载地址 2.XMing的配置:打开XLaunch,记住Display Number,现在这里是0 ...
 - 【重点突破】—— UniApp微信小程序开发教程学习Three
			
一.实战 HBuilderX:在微信小程序中运行页面,需要设置->安全 开启微信小程序服务端口,HBuilder工具->设置->配置程序路径 网络请求.模板语法.打开页面.页面传参 ...
 - PropertyInfo、FieldInfo、MemberInfo的区别
			
public class TestClass { ;//私有一律获取不到 public int b { ; } ; } } ; } public static void TestMethod() { ...
 - 使用pycharm编写python乱码
			
开始总是乱码,该设置的都设置了,后来用charde检测编码也一直报错,之后重启了pycharm就好了,乱码问题也没了
 - Eclipse高版本无法兼容FatJar的问题解决
			
发现eclipse打包jar无法连带打包第三方lib,于是选择安装插件fatjar,现在说明fatjar安装过程: 1.安装方法: 1)下载安装: https://sourceforge.ne ...