Firefly安装说明 与 常见问题

原地址:http://bbs.gameres.com/thread_223688.html

第三方库依赖:
    twisted, python-memcached ftp://ftp.tummy.com/pub/python-memcached/python-memcached-1.53.tar.gz,

DBUtils,http://www.webwareforpython.org/downloads/DBUtils/

MySQLdb

安装第三方库:
    easy_install twisted(windows下可以直接用Twisted-12.2.0.win32-py2.6.exe进行安装,如果是python2.7的可以使用Twisted-12.2.0.win32-py2.7.exe)
    easy_install python-memcached
    easy_install DBUtils
    easy_install zope.interface
    easy_install affinity
    easy_install MySQL-python(windows下可以直接用MySQL-python-1.2.3c1.win32-py2.6.exe进行安装,如果是python2.7的可以使用MySQL-python-1.2.4.win32-py2.7.exe)

安装Firefly
    跳转到firefly目录下,
    python setup.py build
    python setup.py install

   安装完毕


常见问题解决方案:问题:
<ignore_js_op>Firefly安装说明 与 常见问题(第三方库帖内下载) ... 
回答:这个问题只有在windows环境下才会出现,需要安装pywin32,下面这个附件中下载!名字叫做:pywin32-214.win32-py2.6.exe


问题:
在import MySQLdb时应该会报下面这个错:
D:usrlocalPython26>python 
Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win32 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import MySQLdb 
Traceback (most recent call last): 
  File "<stdin>", line 1, in <module> 
  File "D:usrlocalPython26Libsite-packagesMySQLdb\__init__.py", line 19, in <module> 
    import _mysql 
ImportError: DLL load failed: 找不到指定的模块。 

回答:
1、下载libmmd.dll和libguide40.dll两个dll文件并复制系统的System32目录和python安装目录的Libsite-packages之下。 再次import MySQLdb时就不会报错了。

如果遇到下面这个警告,没有关系不必理会:
Warning (from warnings module):
  File "D:Python26libsite-packagesMySQLdb\__init__.py", line 34
    from sets import ImmutableSet
DeprecationWarning: the sets module is deprecated

libmmd.dll和libguide40.dll这两个文件可以网上下载到。

2、如果你是64位系统,那么请使用64位的包。
下载地址为:http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
(感谢9秒社团内的 上海-菜菜 好心提供!)

问题:mac环境下,如果安装MySQL-python时出错。

回答:
A、如果提示权限不够,命令前加sudo
B 、如果碰到mysql_config not found的问题,有两种方法解决:
      1、sudo ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config
将mysql_confi从你的安装目录链接到/usr/local/bin目录下,这样就可以在任意目录下访问了(也可以放到/usr/bin)
      2、编辑源码文件夹的site.cfg文件,去掉#mysql_config =  /usr/local/bin/mysql_config前的注释#,修改后面的路径为你的mysql_config真正的目录就可以了。(如果不知道 mysql_config在哪里,运行命令:whereis mysql_config)
   (特别鸣谢:@drinking兄,是他解决此问题,超级感谢!)

原文地址:https://www.cnblogs.com/123ing/p/3902888.html