distribute does not install with python3 on Ubuntu machine

If I run (on an Ubuntu machine) the command: sudo pip install --upgrade distribute Everything goes well and the package installs. But if I run the same with Python3 with: sudo pip-3.2 install --upgrade distribute I get this: "File "setuptools/dist.py", line 103 except ValueError, e: ^ SyntaxError: invalid syntax" I think the problem is that with someone recently forgot to put the parentheses (i.e. "except ValueError, e:" should be "except (ValueError, e):") and therefore this does not work anymore with python3. It should be easy to fix. Furthermore, this problem seems to be widespread within the package. Giulio

On Fri, Mar 15, 2013 at 2:46 PM, Giulio Genovese <giulio.genovese@gmail.com> wrote:
sudo pip-3.2 install --upgrade distribute I get this: "File "setuptools/dist.py", line 103 except ValueError, e:
You can't upgrade distribute with pip under Python 3. This is a known problem. https://github.com/pypa/pip/issues/650
I think the problem is that with someone recently forgot to put the parentheses (i.e. "except ValueError, e:" should be "except (ValueError, e):") and therefore this does not work anymore with python3.
No, the syntax under Python 3 is except ValueError as 3, but that doesn't work with Python 2.4 and Python 2.5 and we are still supporting them.
It should be easy to fix.
It isn't. The solution is to not try to upgrade distribute with pip under Python 3. Uninstall it and install it again instead. //Lennart

On Mon, Mar 18, 2013 at 02:14:12PM -0700, Lennart Regebro wrote:
On Fri, Mar 15, 2013 at 2:46 PM, Giulio Genovese <giulio.genovese@gmail.com> wrote:
sudo pip-3.2 install --upgrade distribute I get this: "File "setuptools/dist.py", line 103 except ValueError, e:
You can't upgrade distribute with pip under Python 3. This is a known problem.
https://github.com/pypa/pip/issues/650
I think the problem is that with someone recently forgot to put the parentheses (i.e. "except ValueError, e:" should be "except (ValueError, e):") and therefore this does not work anymore with python3.
No, the syntax under Python 3 is except ValueError as 3, but that doesn't work with Python 2.4 and Python 2.5 and we are still supporting them.
It should be easy to fix.
It isn't. The solution is to not try to upgrade distribute with pip under Python 3. Uninstall it and install it again instead.
Wouldn't merging Vinay's distribute3 branch fix this? http://mail.python.org/pipermail/distutils-sig/2013-February/019990.html Marius Gedminas -- * philiKON wonders what niemeyer is committing :) *** benji_york is now known as benji <benji> murder? -- #zope3-dev

On Tue, Mar 19, 2013 at 7:25 AM, Marius Gedminas <marius@pov.lt> wrote:
On Mon, Mar 18, 2013 at 02:14:12PM -0700, Lennart Regebro wrote:
On Fri, Mar 15, 2013 at 2:46 PM, Giulio Genovese <giulio.genovese@gmail.com> wrote:
sudo pip-3.2 install --upgrade distribute I get this: "File "setuptools/dist.py", line 103 except ValueError, e:
You can't upgrade distribute with pip under Python 3. This is a known problem.
https://github.com/pypa/pip/issues/650
I think the problem is that with someone recently forgot to put the parentheses (i.e. "except ValueError, e:" should be "except (ValueError, e):") and therefore this does not work anymore with python3.
No, the syntax under Python 3 is except ValueError as 3, but that doesn't work with Python 2.4 and Python 2.5 and we are still supporting them.
It should be easy to fix.
It isn't. The solution is to not try to upgrade distribute with pip under Python 3. Uninstall it and install it again instead.
Wouldn't merging Vinay's distribute3 branch fix this?
I don't think we should stop using 2to3 until we drop support for 2.5, which we haven't done yet. The codebase is very brittle, so conservatism is appropriate. I think the new setuptools + distribute branch could be the right place to do this, but that's up to the setuptools maintainers. //Lennart
participants (3)
-
Giulio Genovese
-
Lennart Regebro
-
Marius Gedminas