#!/usr/bin/python3 import pymysql.cursors db = pymysql.connect( host = '127.0.0.1', port = 3306, user = 'root', passwd = 'root', db = 'li', charset = 'utf-8' ) conn = db.cursor() sql = """create table page( id bigint(7) not null , title varchar(200), content vachar(10000), created timestamp default current_timestamp , primary key (id) ) """ conn.execute(sql) conn.close() db.close()
错误提示:
E:\untitled\venv\Scripts\python3.exe E:/untitled/two/mysql_one.py
Traceback (most recent call last):
File "E:/untitled/two/mysql_one.py", line 2, in <module>
import pymysql.cursors
File "E:\untitled\venv\lib\site-packages\pymysql\__init__.py", line 96, in <module>
from . import connections as _orig_conn
File "E:\untitled\venv\lib\site-packages\pymysql\connections.py", line 17, in <module>
from . import _auth
File "E:\untitled\venv\lib\site-packages\pymysql\_auth.py", line 9, in <module>
from cryptography.hazmat.primitives import serialization, hashes
File "E:\untitled\venv\lib\site-packages\cryptography\hazmat\primitives\serialization.py", line 16, in <module>
from cryptography.hazmat.primitives.asymmetric import dsa, ec, rsa
File "E:\untitled\venv\lib\site-packages\cryptography\hazmat\primitives\asymmetric\__init__.py", line 12, in <module>
@six.add_metaclass(abc.ABCMeta)
AttributeError: module 'six' has no attribute 'add_metaclass'
Process finished with exit code 1
<p>pip install six</p>
不行诶
<p>pip3 install six</p>
不行诶,pip后说已经satisfied
<p>pip install six -U</p>
不行呢,pip不成功
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。