pip通过安装mysqlclient,导入Cython失败:DLL加载失败:%1不是有效的Win32应用程序。

2024-04-26 10:42:50 发布

您现在位置:Python中文网/ 问答频道 /正文

嗨,我在Django documentation之后,早先我想过使用oracledb,但没有得到正确的文档,因此决定使用mysql-db。我已经安装了mysql 5.7.19.0。你知道吗

当我运行pip install mysqlclient时,我得到了下面的错误

 copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-2.7\MySQLdb\constants
  running build_ext
  failed to import Cython: DLL load failed: %1 is not a valid Win32 application.
  error: Cython does not appear to be installed

但是当我键入pip install cython时,我可以看到Cython已经安装好了。我使用的是64位windows机器,安装的是python 2.7.2(64位)。如何解决这个问题?请告诉我任何其他可用于设置MySql db的文档(django版本1.8+python 2.7.12)?在web上搜索,但无法解决此问题。你知道吗


Tags: installpiptodjango文档builddbdocumentation