我试图使用"pip MySQL -连接器-python“安装mysql连接器,但它说
Requirement already satisfied (use --upgrade to upgrade): mysql-connector-python in /Library/Python/2.7/site-packages
我正在使用Python空闲,我想以某种方式在IDLE的模块目录中安装mysql-连接器,比如MySQLdb。
如何将默认目录/Library/Python/2.7/site-包更改为空闲使用的目录?
我已经成功地在运行Snow Leopard的机器上安装了来自MacPorts的py27-mysql和MySQL-python-1.2.3c1。因为我在一个奇怪的位置(/usr/local/ MySQL /bin/mysql/)安装了Python5.1.48,所以在安装mysql-mysql时必须编辑setup.cfg文件。但是,现在它已经安装好了,当我在Python语言中运行“导入MySQLdb”时,仍然收到错误"ImportError: No module named MySQLdb“。剩下要安装的是什么?谢谢。
我正在尝试安装和使用新的Python包,例如mysql
pip install mysql
Collecting mysqlNote: you may need to restart the kernel to use updated packages.
Using cached mysql-0.0.3-py3-none-any.whl (1.2 kB)
Collecting mysqlclient
Using cached mysqlclient-2.1.0-cp38-cp38-win_amd64.whl (180 kB)
Installing collected packages
python命令是pip install mysql-python 完整错误为_mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory 有人能告诉我如何修复这个错误吗? mysql-python到底是什么?它与常规的mysql有什么不同? 另一篇堆栈溢出帖子建议使用安装程序可执行文件安装它,我在哪里可以找到它? 我从这里安装了一个叫做mysql python connector的东西:https://downloads.mysql.c
我正在尝试导入python包,但它无法工作。每个包裹都失败了。当我尝试pip安装或conda安装时,它说要求已经满足了.
当我在终点站使用python时,
导入mysql也不能工作.
这是我的终端的内容:
(venv) C:\Users\<user>\Documents\Mes Documents\Code\Fichiers\13_sql_w_python>pip install mysql
Requirement already satisfied: mysql in c:\users\<user>\anaconda3\envs\venv\lib\site-pa