DjangoBlog icon indicating copy to clipboard operation
DjangoBlog copied to clipboard

ModuleNotFoundError: No module named 'mdeditor'

Open DaobinZhu opened this issue 5 years ago • 11 comments
trafficstars

师兄你好,我这个项目启动或者是移植都会报这个错,这是怎么回事啊,求解答,谢谢您

DaobinZhu avatar Mar 19 '20 04:03 DaobinZhu

师兄你好,我这个项目启动或者是移植都会报这个错,这是怎么回事啊,求解答,谢谢您 pip install django-mdeditor

yinzhuoqun avatar Mar 19 '20 10:03 yinzhuoqun

师兄,这个我也试过了,但是它就是报这个错误,我把这个依赖单独下载了

------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上6:18 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>; "Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384)

pip install django-mdeditor

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

DaobinZhu avatar Mar 19 '20 10:03 DaobinZhu

我手动下载这个文件,但是不知道怎么配置。。。这样也不行 ------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上6:18 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>;"Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384)

师兄你好,我这个项目启动或者是移植都会报这个错,这是怎么回事啊,求解答,谢谢您 pip install django-mdeditor

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

DaobinZhu avatar Mar 19 '20 10:03 DaobinZhu

我手动下载这个文件,但是不知道怎么配置。。。这样也不行 ------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上6:18 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>;"Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384) 师兄你好,我这个项目启动或者是移植都会报这个错,这是怎么回事啊,求解答,谢谢您 pip install django-mdeditor — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

现在可以下载.tar.gz源代码包,手动加 encoding="utf-8" 改错然后 python setup.py install 安装。 或者 pip install django-mdeditor==0.1.16

yinzhuoqun avatar Mar 19 '20 11:03 yinzhuoqun

大哥,这个mysqlclient和pillow也是安装不上。。我是django小白可以指点一下么。。麻烦您了

------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上7:09 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>; "Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384)

我手动下载这个文件,但是不知道怎么配置。。。这样也不行 ------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上6:18 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>;"Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384) 师兄你好,我这个项目启动或者是移植都会报这个错,这是怎么回事啊,求解答,谢谢您 pip install django-mdeditor — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

现在可以下载.tar.gz源代码包,手动加 encoding="utf-8" 改错然后 python setup.py install 安装。 或者 pip install django-mdeditor==0.1.16

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

DaobinZhu avatar Mar 19 '20 11:03 DaobinZhu

我手动下载的mysqlclient,在https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient,但是报错下载不下来,版本是正确的,我电脑是python3.8,但是安装不上去,报错信息为ERROR: mysqlclient-1.4.6-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.

------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上7:09 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>; "Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384)

我手动下载这个文件,但是不知道怎么配置。。。这样也不行 ------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上6:18 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>;"Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384) 师兄你好,我这个项目启动或者是移植都会报这个错,这是怎么回事啊,求解答,谢谢您 pip install django-mdeditor — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

现在可以下载.tar.gz源代码包,手动加 encoding="utf-8" 改错然后 python setup.py install 安装。 或者 pip install django-mdeditor==0.1.16

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

DaobinZhu avatar Mar 19 '20 11:03 DaobinZhu

师兄,目前已经把依赖解决了,但是数据移植又报错了。。。django.db.utils.InternalError: (1071, 'Specified key was too long; max key length is 767 bytes')

------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上7:09 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>;"Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384)

我手动下载这个文件,但是不知道怎么配置。。。这样也不行 ------------------ 原始邮件 ------------------ 发件人: "yinzhuoqun"<[email protected]>; 发送时间: 2020年3月19日(星期四) 晚上6:18 收件人: "liangliangyy/DjangoBlog"<[email protected]>; 抄送: "1169213632"<[email protected]>;"Author"<[email protected]>; 主题: Re: [liangliangyy/DjangoBlog] ModuleNotFoundError: No module named 'mdeditor' (#384) 师兄你好,我这个项目启动或者是移植都会报这个错,这是怎么回事啊,求解答,谢谢您 pip install django-mdeditor — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

现在可以下载.tar.gz源代码包,手动加 encoding="utf-8" 改错然后 python setup.py install 安装。 或者 pip install django-mdeditor==0.1.16

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

DaobinZhu avatar Mar 19 '20 12:03 DaobinZhu

表djangoblog.blog_article迁移失败,项目启动不起来。。

Request Method: GET
http://127.0.0.1:8000/
3.0.4
ProgrammingError
(1146, "Table 'djangoblog.blog_article' doesn't exist")
C:\Users\Administrator\Downloads\DjangoBlog-master\venv\lib\site-packages\pymysql\err.py in raise_mysql_exception, line 109
C:\Users\Administrator\Downloads\DjangoBlog-master\venv\Scripts\python.exe
3.8.1
['C:\Users\Administrator\Downloads\DjangoBlog-master', 'C:\Program Files\JetBrains\PyCharm ' '2019.3.2\plugins\python\helpers\pydev', 'C:\Users\Administrator\Downloads\DjangoBlog-master', 'C:\Program Files\JetBrains\PyCharm ' '2019.3.2\plugins\python\helpers\pycharm_display', 'C:\Program Files\JetBrains\PyCharm ' '2019.3.2\plugins\python\helpers\third_party\thriftpy', 'C:\Program Files\JetBrains\PyCharm ' '2019.3.2\plugins\python\helpers\pydev', 'C:\Users\Administrator\.PyCharm2019.3\system\cythonExtensions', 'C:\Python\python38.zip', 'C:\Python\DLLs', 'C:\Python\lib', 'C:\Python', 'C:\Users\Administrator\Downloads\DjangoBlog-master\venv', 'C:\Users\Administrator\Downloads\DjangoBlog-master\venv\lib\site-packages', 'C:\Users\Administrator\Downloads\DjangoBlog-master\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg', 'C:\Program Files\JetBrains\PyCharm ' '2019.3.2\plugins\python\helpers\pycharm_matplotlib_backend']
星期四, 19 三月 2020 20:31:48 +0800

DaobinZhu avatar Mar 19 '20 12:03 DaobinZhu

是 Windows 环境 py 3.8 吧。几个要点:

  1. django-meditor 安装失败,是由于它的 bug https://github.com/pylixm/django-mdeditor/issues/72 导致的。目前需要在系统设置环境变量 PYTHONUTF8=1 然后 pip install 可以解决 image

  2. 需要更新 pip 和 setuptools 到最新版,否则 mysqlclient 安装失败。python -m pip install --upgrade pip setuptools

  3. max key length is 767 bytes 请检查数据表是否以 utf8mb4 InnoDB 模式创建

stackia avatar Mar 20 '20 12:03 stackia

mac catalina 使用这简直是灾难。。。。我放弃了

tide1994cc avatar Dec 09 '20 13:12 tide1994cc

为啥下载了Django-mdeditor之后还是报这个错啊呜呜


报错信息: Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "E:\computer\language\Python_Pycharm\Python\Python379\lib\site-packages\django\core\management_init_.py", line 381, in execute_from_command_lin e utility.execute() File "E:\computer\language\Python_Pycharm\Python\Python379\lib\site-packages\django\core\management_init_.py", line 357, in execute django.setup() File "E:\computer\language\Python_Pycharm\Python\Python379\lib\site-packages\django_init_.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "E:\computer\language\Python_Pycharm\Python\Python379\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "E:\computer\language\Python_Pycharm\Python\Python379\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "E:\computer\language\Python_Pycharm\Python\Python379\lib\importlib_init_.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'mdeditor'

已安装包: PK27%66(TAMD9`ML2D5MMRX

l1chao avatar Jul 05 '22 14:07 l1chao