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 ...
随机推荐
- Html !!!了解一下
1.什么是超文本 超文本:就是指页面内可以包含图片,链接,甚至音乐,程序等非文字元素; 最常用的超文本格式:超文本标记语言(标记通用语言的下个一个应用)和富文本格式 超文本语言的特点: 简易性:超文本 ...
- ROI pooling
R-CNN需要大量的候选框,对每个候选框都提取特征,速度很慢,无法做到实时检测,无法做到端到端.ROI pooling层实现training和testing的显著加速,并提高检测accuracy. R ...
- tf_upgrade_v2.exe实验
实验前 import tensorflow as tf import numpy as np #create data x_data=np.random.rand(100).astype(np.flo ...
- LNK1104 无法打开文件“proj.lib”
两种可能: 1.proj.lib不存在 2.proj.lib不符合编译的debug(release)版本
- windows与ubuntu双系统的安装
将ubuntu镜像烧录至U盘,从U盘启动电脑 选择自定义安装,不要选择它本身的双系统选项. 我的方案分区: 1. 挂载点/:主分区:安装系统和软件:大小为30G:分区格式为ext4:2. 挂载点/ho ...
- [CSP-S模拟测试]:光线追踪(线段树)
题目背景 初中时的乔猫试着组建了$NEWorld$开发组,可是不久之后却因为合作上的问题(和乔猫工程水平差,代码混乱的问题),开发组成员之间常常产生矛盾,关系越来越不如以前......一年下来,受到长 ...
- 大数据笔记(二十五)——Scala函数式编程
===================== Scala函数式编程 ======================== 一.Scala中的函数 (*) 函数是Scala中的头等公民,就和数字一样,可以在变 ...
- 【每日一包0007】array-range
[github地址:https://github.com/ABCDdouyae...] array-range 生成一个指定起始位置的固定长度的数组 用法:array-range(start, end ...
- 原生js去除行内样式
概述 今天我用js给dom元素设置样式,碰到了一些问题,记下来供以后开发时参考,相信对其他人也有用. 心得 js加上class: $dom.classList.add('some-class'); j ...
- 阶段2 JavaWeb+黑马旅游网_15-Maven基础_第2节 maven的安装和仓库种类_05仓库的种类和彼此关系
maven工程里面放的是jar包的坐标. 启动项目的时候会根据jar包的坐标到仓库中找对应的坐标 maven的安装目录.conf/settings.xml文件 ${user.home}表示系统盘,用户 ...