【问题标题】:pip install django mysqlclient 'path should be string, bytes, os.PathLike or integer, not NoneType' on windowspip install django mysqlclient '路径应该是字符串、字节、os.PathLike 或整数,而不是 Windows 上的 NoneType'
【发布时间】:2019-11-16 07:31:11
【问题描述】:

我是 Python 和 Django 的新手,想在 Windows 上安装 mysqlclient。当我在 cmd 中使用命令 pip install django mysqlclient 时,它会抛出此错误:

文件“d:\myprojects\python\mytestdjangoprj\myproject\lib\genericpath.py”,第 30 行,在 isfile st = os.stat(路径) TypeError: stat: path 应该是字符串、字节、os.PathLike 或整数,而不是 NoneType

请帮帮我。

【问题讨论】:

  • 确保您使用的是 64 位 Python。有最新的 mysqlclient 1.4.5 的轮子,所以 pip install mysqlclient 现在应该可以工作,只要您使用 64 位 Python 3.6、3.7 或 3.8。

标签: python mysql django windows


【解决方案1】:

正如 Alasdair 所说,使用 64 位解决问题。感谢 Alasdair。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-05
    • 2020-03-25
    • 2021-05-04
    • 2021-06-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多