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 ...
随机推荐
- codevs 1057 津津的储蓄计划 2004年NOIP全国联赛提高组 x
时间限制: 1 s 空间限制: 128000 KB 题目描述 Description 津津的零花钱一直都是自己管理.每个月的月初妈妈给津津300元钱,津津会预算这个月的花销,并且总能做到实际花 ...
- 容器适配器————queue
只能访问 queue<T> 容器适配器的第一个和最后一个元素.只能在容器的末尾添加新元素,只能从头部移除元素. 操作 queue<int> q;//创建一个int型的空队列q ...
- 一、Spring MVC起步——IntelliJ IDEA 搭建Spring MVC环境(手把手搭建)
本机环境: JDK 1.7 IntelliJ IDEA 2017.2 1.新建项目 Create New Project 选择Spring MVC 填写项目名和项目存放位置 然后点击Fin ...
- (转载)FM 算法
(转载)FM算法 https://zhuanlan.zhihu.com/p/33184179
- Java字符串的不可变性
声明一个字符串引用变量: String s = "abcd"; s是一个引用变量,指向 堆内存中的字符串常量 "abcd" 再声明一个字符串引用变量: Str ...
- zabbix 监控hp 打印机
https://share.zabbix.com/search?searchword=hp+printer&search_cat=1
- sh脚本获取当前目录
#!/bin/bashcurDir=$(pwd)echo "cur dir is:$curDir"
- 红帽虚拟化RHEV-架构简介
目录 目录 软件环境 RHEV简介 RHEV与KVM的区别 RHEV的组成 RHEV-MManager RHEV-HHypervisor 虚拟机管理程序 存储 RHEV的架构 LDAPIPAAD We ...
- Unity Mathf And Transform Compent(一)
Mathf类部分变量 辐射到度的转化函数,能够将弧度转化成度. Abs 能够求出绝对值 Atan 求出正切值x/y的弧度 Transform 组件中带有local 以父物体为坐标原点 global以世 ...
- vue启动流程
继上一篇vue环境的搭建(在D盘新建文件夹vue_cli,把(我已经上传到了文件下)资料下tpls解压完后的所有文件都复制到D盘vue_cli下) 目录如图: 1.webstorm设置为了提高webS ...