django-cms 安装错误“找不到.pyc”

django-cms install error ".pyc not found "

尝试安装 django cms 时遇到异常。请帮忙

E:\Workspace\cms>pip install django-cms
Collecting django-cms
  Using cached django_cms-3.4.1-py2.py3-none-any.whl
Requirement already satisfied: django-treebeard>=4.0.1 in c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages (from django-cms)
Requirement already satisfied: djangocms-admin-style>=1.0 in c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages (from django-cms)
Requirement already satisfied: django-sekizai>=0.7 in c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages (from django-cms)
Requirement already satisfied: Django<1.10,>=1.8 in c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages (from django-cms)
Requirement already satisfied: django-classy-tags>=0.7.2 in c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages (from django-cms)
Requirement already satisfied: django-formtools>=1.0 in c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages (from django-cms)
Installing collected packages: django-cms
Exception:
Traceback (most recent call last):
  File "c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages\pip\req\req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\site-packages\pip\wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "c:\users\satish.sharma\appdata\local\programs\python\python35-32\lib\shutil.py", line 115, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'c:\users\satish.sharma\appdata\local\programs\python\python35-32\Lib\site-packages\cms\test_utils\project\extensionapp\migrations\__pycache__\0003_multitablepageextension_multitablepageextensionparent_multitabletitleextension_multitabletitleextens.cpython-35.pyc'

我认为这可能不是 django-cms 问题,而是 Windows 最大路径长度问题(即 260 个字符)。

如果您使用 Windows 10,您应该可以解除限制:

  1. 打开组策略编辑器(按 Windows 键并输入 gpedit.msc 并按回车键。
  2. 导航到以下目录:本地计算机策略 > 计算机配置 > 管理模板 > 系统 > 文件系统 > NTFS。
  3. 点击启用 NTFS 长路径选项并启用它。

来源:https://mspoweruser.com/ntfs-260-character-windows-10/