前言

我准备用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的更多相关文章

  1. 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 ...

  2. python mongodb ubuntu

    mongodb install: sudo apt-get install mongodb Install pip 1. $ sudo apt-get install python-pip pytho ...

  3. 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 ...

  4. HOWTO install Oracle 11g on Ubuntu Linux 12.04 (Precise Pangolin) 64bits

    安装了Ubuntu 12.04 64bit, 想在上面安装Oracle 11gr2,网上找了好多文档都没成功,最后完全参考了MordicusEtCubitus的文章. 成功安装的关键点:install ...

  5. Install a Redmine on Ubuntu system

    # How to install a Redmine on Ubuntu system Ref to: https://www.linode.com/docs/applications/project ...

  6. How do you install Google Chrome on Ubuntu?

    https://askubuntu.com/questions/510056/how-to-install-google-chrome sudo apt-get install chromium-br ...

  7. Install eclipse ns3 in ubuntu 14.04

    1. NS3 install 参考NS3 tutorial即可. 2.eclipse 2.1下载 下载地址:http://www.eclipse.org/downloads/              ...

  8. 【转载】Stackless Python并发式编程介绍[已校对版]

    Stackless Python并发式编程介绍[已校对版] 作者:    Grant Olson 电子邮件:    olsongt@verizon.net 日期:    2006-07-07 译者:  ...

  9. install dns server on ubuntu

    参考 CSDN/Ubuntu环境下安装和配置DNS服务器 在 Ubuntu 上安裝 DNS server Install BIND 9 on Ubuntu and Configure It for U ...

随机推荐

  1. K8S简介

    简介 Kubernetes是一个开源的,用于管理云平台中多个主机上的容器化的应用,Kubernetes的目标是让部署容器化的应用简单并且高效(powerful),Kubernetes提供了应用部署,规 ...

  2. SpringBoot2.2发行版新特性

    Spring Framework升级 SpringBoot2.2的底层Spring Framework版本升级为5.2. JMX默认禁用 默认情况下不再启用JMX. 可以使用配置属性spring.jm ...

  3. logstash搭建

    logstash就是一个具备实时数据传输能力的管道,负责将数据信息从管道的输入端传输到管道的输出端:与此同时这根管道还可以让你根据自己的需求在中间加上滤网,Logstash提供里很多功能强大的滤网以满 ...

  4. 用命令行编译运行java文件的乱码问题

    之前在写的时候没有遇到过这个问题,用惯了eclipse之后突然用Notepad++就出现乱码了 我在编写的时候 指定Noepad++的编码是 UTF-8编码,然后进入命令行,编译的时候就出现了乱码 然 ...

  5. C# 读取Excel中的数据到DataTable中

    原文地址:http://www.open-open.com/code/view/1420029490093 public DataTable ExcelToDS(string Path) { stri ...

  6. 记一次全局分区索引update调优

    原始SQL: CREATE OR REPLACE PROCEDURE sp_upd_suppressed_emails(  A_LIMIT_BULK IN PLS_INTEGER DEFAULT 20 ...

  7. Zabbix通过SNMP监控HP Gen10服务器的硬件

    http://www.zmzblog.com/monitor/zabbix-how-to-monitoring-hp-gen10-server-hardware.html

  8. 十、Springboot之thymeleaf与jsp共存

    : pom.xml添加依赖 <!--thymeleaf整合JSP需要用到下面的依赖--> <dependency> <groupId>org.thymeleaf&l ...

  9. python使用相对路径创建文件夹

    两个py文件,一个是al文件夹下的test1.py,一个是和al文件夹同层的test2.py test1.py代码如下: import os def test(): path = './source_ ...

  10. 【ABAP系列】SAP 面试 ABAPer的一些感想

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP 面试 ABAPer的一些 ...