PyMySQL不会安装到raspberry pi上

时间:2017-04-06 07:56:10

标签: python mysql raspberry-pi

我已经尝试了我可以找到安装PyMySQL的每个答案,例如见下文:

sudo pip install PyMySQL
Downloading/unpacking PyMySQL
Downloading PyMySQL-0.7.11-py2.py3-none-any.whl (78kB): 78kB downloaded
Installing collected packages: PyMySQL
Successfully installed PyMySQL

但是仍然没有运气,当运行使用pymysql的.py脚本时,它只返回以下内容:

python UpworkCode.py
Traceback (most recent call last):
File "UpworkCode.py", line 2, in <module>
import PyMySQL
ImportError: No module named PyMySQL

请有人帮我摆脱这绝望的感谢

1 个答案:

答案 0 :(得分:0)

请改用var router = express.Router(); var birds = require('./birds') //api specific routes router.get('/', function(req, res) { res.send('Welcome to our API!'); }); router.use('/birds', birds); !实际上,正确的包名称是import pymysql,而不是pymysql
请记住,pip不区分大小写,但python是!