python游戏环境搭建

安装Mysql模块:

  1. yum install python-devel mysql-devel zlib-devel openssl-devel
  2. wget   http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3.tar.gz
  3.  wget   http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg
  4. sh setuptools-0.6c11-py2.4.eg, import  setuptools 表示setuptools成功了
  5. 安装  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

 

你可能感兴趣的:(python)