Chinaunix首页 | 论坛 | 博客
  • 博客访问: 912
  • 博文数量: 2
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 31
  • 用 户 组: 普通用户
  • 注册时间: 2023-05-16 13:45
文章分类
文章存档

2023年(2)

我的朋友
最近访客

分类: Python/Ruby

2023-05-16 13:51:48

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'
阅读(98) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~