chris1610 / pbpython

Code, Notebooks and Examples from Practical Business Python
https://pbpython.com
BSD 3-Clause "New" or "Revised" License
1.99k stars 987 forks source link

Can't add the python-pptx dependency on pycharm for pyhon3.4 #1

Closed Hinsteny closed 8 years ago

Hinsteny commented 8 years ago

Could anybody give me some help? Thanks more

chris1610 commented 8 years ago

How are you trying to install python-pptx?

It should be as simple as pip install python-pptx

Hinsteny commented 8 years ago

yes, i have tried many times as use pip install, but always get this error ''' running build_ext

building 'lxml.etree' extension

error: Unable to find vcvarsall.bat


Cleaning up... Command C:\Users\Administrator\python3.4\Scripts\python.exe -c "import setuptools, tokenize;file='C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging0.tmp\lxml\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record C:\Users\ADMINI~1\AppData\Local\Temp\pip-170fqvlr-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Administrator\python3.4\include\site\python3.4 failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging0.tmp\lxml Exception information: Traceback (most recent call last): File "C:\Program Files\Python3.4\lib\site-packages\pip\basecommand.py", line 122, in main status = self.run(options, args) File "C:\Program Files\Python3.4\lib\site-packages\pip\commands\install.py", line 283, in run requirement_set.install(install_options, global_options, root=options.root_path) File "C:\Program Files\Python3.4\lib\site-packages\pip\req.py", line 1435, in install requirement.install(install_options, global_options, _args, *_kwargs) File "C:\Program Files\Python3.4\lib\site-packages\pip\req.py", line 706, in install cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) File "C:\Program Files\Python3.4\lib\site-packages\pip\util.py", line 697, in call_subprocess % (command_desc, proc.returncode, cwd)) pip.exceptions.InstallationError: Command C:\Users\Administrator\python3.4\Scripts\python.exe -c "import setuptools, tokenize;file='C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging0.tmp\lxml\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record C:\Users\ADMINI~1\AppData\Local\Temp\pip-170fqvlr-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Administrator\python3.4\include\site\python3.4 failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging0.tmp\lxml '''

chris1610 commented 8 years ago

I think it is having an issue installing lxml binaries on your windows machine.

Trying install lxml first from here - http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

Even better, using conda for installing a python environment in windows - http://conda.pydata.org/docs/

Hinsteny commented 8 years ago

Ok, let me try as you said .

Thank you very much