使用pyinstaller

时间:2015-11-13 17:49:20

标签: python mysql-python pyinstaller

我在使用pyinstaller之后打开我的应用程序时遇到错误,当使用pyinstaller时,应用程序仍然在.py它正在100%工作

之后我收到此错误

Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "c:\users\deounix\appdata\local\temp
.5-py2.7-win32.egg.tmp\MySQLdb\__init__.py"
  File "c:\users\deounix\appdata\local\temp
.5-py2.7-win32.egg.tmp\_mysql.py", line 7,
  File "c:\users\deounix\appdata\local\temp
.5-py2.7-win32.egg.tmp\_mysql.py", line 3,
ImportError: No module named pkg_resources

我正在做的是:

#!/usr/bin/python
import MySQLdb
from time import sleep

db = MySQLdb.connect(host="localhost", user="root", port=3306, passwd="123456", db="test")

cur = db.cursor() 

cur.execute("SHOW TABLES")

for row in cur.fetchall() :
    print row
sleep(10)

0 个答案:

没有答案