0
votes

I am trying to download a couple of packages in python 3.5 but pip keeps throwing an exception(via pip install pyzmail), please see below:

How do I overcome this issue?

Exception: Traceback (most recent call last): File "c:\users\chiruld\appdata\local\programs\python\python35\lib\pip\basecommand.py", line 122, in main status = self.run(options, args) File "c:\users\chiruld\appdata\local\programs\python\python35\lib\pip\commands\install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "c:\users\chiruld\appdata\local\programs\python\python35\lib\pip\req.py", line 1229, in prepare_files req_to_install.run_egg_info() File "c:\users\chiruld\appdata\local\programs\python\python35\lib\pip\req.py", line 292, in run_egg_info logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.setup_py, self.name)) File "c:\users\chiruld\appdata\local\programs\python\python35\lib\pip\req.py", line 265, in setup_py import setuptools File "c:\users\chiruld\appdata\local\programs\python\python35\lib\setuptools__init__.py", line 2, in from setuptools.extension import Extension, Library File "c:\users\chiruld\appdata\local\programs\python\python35\lib\setuptools\extension.py", line 5, in from setuptools.dist import _get_unpatched File "c:\users\chiruld\appdata\local\programs\python\python35\lib\setuptools\dist.py", line 103 except ValueError, e: ^ SyntaxError: invalid syntax

1
Tell the developer to rewrite it for Python 3.x.Ignacio Vazquez-Abrams
That is not the problem, but thanks for the input.Luis
It looks like c:\users\chiruld\appdata\local\programs\python\python35\lib\setuptools\dist.py is written for Python 2. The except ValueError, e: syntax is only Valid in Python 2. In Python 3 it needs to be written as except ValueError as e:. Can you provide more detail on the commands you're using to install pyzmail and/or imapclient? I'm the maintainer of IMAPClient and I know it does install and function on Python 3.5. This looks to be some sort of environmental issue.Menno Smits

1 Answers

0
votes

If you are using Windows.., try right clicking 'cmd.exe' and select 'Run as Administrator' and click 'Yes' to allow the following program to make changes to this computer.