python游戏环境搭建
安装Mysql模块:
- yum install python-devel mysql-devel zlib-devel openssl-devel
- wget http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3.tar.gz
- wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg
- sh setuptools-0.6c11-py2.4.eg, import setuptools 表示setuptools成功了
- 安装 MySQL-python-1.2.3.tar.gz
tar -zxvf MySQL-python-1.2.3.tar.gz
cd MySQL-python-1.2.3
vi setup_posix.py
找到mysql_config.path 一行,改为mysql_config.path = "/usr/bin/mysql_config"
python setup.py build
python setup.py install
python >>> import MySQLdb
安装json-rpc
apt-get install bzr bzr checkout http://bzr.json-rpc.org/trunk cd trunk/python-jsonrpc python setup.py install