通过pip安装pptx以获取enthought canopy错误

时间:2015-01-09 20:12:19

标签: python installation pip canopy pillow

我无法将pptx设置为使用enthought遮篷(我使用的是Windows 8)。

在使用pip安装期间,会发生以下异常。请注意,在发生异常之前已卸载Pillow。这是我唯一能想到的错误。

 ...running install_egg_info
    running egg_info
    writing requirements to python_pptx.egg-info\requires.txt
    writing python_pptx.egg-info\PKG-INFO
    writing top-level names to python_pptx.egg-info\top_level.txt
    writing dependency_links to python_pptx.egg-info\dependency_links.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'python_pptx.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'python_pptx.egg-info\SOURCES.txt'
    Copying python_pptx.egg-info to C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\Lib\site-packages\python_pptx-0.5.6-py2.7.egg-info
    running install_scripts
    writing list of installed files to 'c:\users\dirkh_000\appdata\local\temp\pip-guwbzu-record\install-record.txt'
  Found existing installation: Pillow 1.7.6
    Uninstalling Pillow:
      Removing file or directory c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pilconvert.py
      Removing file or directory c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pildriver.py
      Removing file or directory c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pilfile.py
      Removing file or directory c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pilfont.py
      Removing file or directory c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pilprint.py
      Successfully uninstalled Pillow
  Rolling back uninstall of Pillow
  Replacing c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pilconvert.py
  Replacing c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pildriver.py
  Replacing c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pilfile.py
  Replacing c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pilfont.py
  Replacing c:\users\dirkh_000\appdata\local\enthought\canopy\user\scripts\pilprint.py
Cleaning up...
  Removing temporary dir C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\build...
        Exception:
    Traceback (most recent call last):
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\basecommand.py", line 122, in main
        status = self.run(options, args)
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\commands\install.py", line 283, in run
        requirement_set.install(install_options, global_options, root=options.root_path)
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 1435, in install
        requirement.install(install_options, global_options, *args, **kwargs)
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 671, in install
        self.move_wheel_files(self.source_dir, root=root)
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 901, in move_wheel_files
        pycompile=self.pycompile,
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\wheel.py", line 215, in move_wheel_files
        clobber(source, lib_dir, True)
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\wheel.py", line 209, in clobber
        shutil.copy2(srcfile, destfile)
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.1.1975.win-x86_64\lib\shutil.py", line 130, in copy2
        copyfile(src, dst)
      File "C:\Users\dirkh_000\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.4.1.1975.win-x86_64\lib\shutil.py", line 83, in copyfile
        with open(dst, 'wb') as fdst:
    IOError: [Errno 13] Permission denied: u'C:\\Users\\dirkh_000\\AppData\\Local\\Enthought\\Canopy\\User\\Lib\\site-packages\\PIL\\_imaging.pyd'

可根据要求提供完整的调试日志。 在冠层中输入import pptx目前会产生:ImportError: No module named _util

我认为这只是一个目录不匹配的问题,但我不确定如何检查是否属于这种情况

1 个答案:

答案 0 :(得分:2)

当Canopy 正在运行时,我可以重现此问题,但当Canopy 正在运行时,我无法重现此问题。< / p>

推定理由:在使用时,您无法替换_imaging.pyd文件(Windows .DLL)。

因此退出Canopy并再试一次。

对于使用PIL的其他软件包会产生什么后果,我不知道。