CentOS 自己安装的python3.5.3 安装pymysql 0.7.10 安装过程没有任何问题,程序运行时有这样的错误出现
同机上2.7,5也安装了同样的模块 运行正常
Traceback (most recent call last):
File "./select.py", line 5, in
import pymysql, datetime
File "/usr/local/lib/python3.5/site-packages/PyMySQL-0.7.10-py3.5.egg/pymysql/__init__.py", line 92, in
from . import connections as _orig_conn
File "/usr/local/lib/python3.5/site-packages/PyMySQL-0.7.10-py3.5.egg/pymysql/connections.py", line 13, in
import socket
File "/usr/local/lib/python3.5/socket.py", line 52, in
import os, sys, io, selectors
File "/usr/local/lib/python3.5/selectors.py", line 11, in
import select
File "/data/data/select.py", line 12, in
conn = pymysql.connect(host='localhost', port=13300, user='root', passwd='', db='mydb', charset='utf8')
AttributeError: module 'pymysql' has no attribute 'connect'
|
|
|