Reputation: 2895
I'm having trouble getting pptx set up to work with enthought canopy (I'm using Windows 8).
During installation using pip the following exception occurs. Notice that Pillow is uninstalled before the exception occurs. This is the only thing I can think that has gone wrong.
...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'
The full debug log is available upon request.
Typing import pptx
in canopy currently yields: ImportError: No module named _util
I'm thinking it's just a matter of mismatched directories, but I'm not sure how exactly to check if that's the case
Upvotes: 0
Views: 440
Reputation: 5810
I can reproduce this problem when Canopy is running, but not when Canopy is not running.
Presumed reason: You can't replace the _imaging.pyd
file (which is a Windows .DLL) when it is in use.
So quit Canopy and try again.
What the consequences will be for other packages that use PIL, I have no idea.
Upvotes: 2