django-cms安装错误“.pyc not found”

时间:2016-12-13 12:04:20

标签: django python-3.x django-cms

在尝试安装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'

1 个答案:

答案 0 :(得分:2)

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

如果您使用的是Windows 10,则应该可以删除限制:

  1. 打开组策略编辑器(按Windows键并键入gpedit.msc并按Enter键。
  2. 导航到以下目录:本地计算机策略&gt; <计算机配置>管理模板&gt;系统&gt;文件系统&gt; NTFS。
  3. 单击“启用NTFS长路径”选项并启用它。
  4. 来源:Stereo Reflection