<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">You could try using the virtualenv rewrite (my branch) - it's well tested, albeit unreviewed. AFAIK it doesn't have the issue you've hit.<br><br>Just run: <code>pip install <a href="https://github.com/ionelmc/virtualenv/archive/develop.zip">https://github.com/ionelmc/virtualenv/archive/develop.zip</a><br><br></code></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><span style="font-family:trebuchet ms,sans-serif"><span style="color:rgb(51,51,51)"><br><font size="2"><span style="color:rgb(51,51,51)">Thanks,</span><br><span style="color:rgb(153,153,153)">-- Ionel</span></font></span><font size="2"><font style="color:rgb(153,153,153)"> Cristian Mărieș, <a href="http://blog.ionelmc.ro" target="_blank">http://blog.ionelmc.ro</a><br></font></font></span></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jul 15, 2015 at 9:08 AM, Marius Gedminas <span dir="ltr"><<a href="mailto:marius@gedmin.as" target="_blank">marius@gedmin.as</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Jul 15, 2015 at 12:55:50AM -0400, Randy Syring wrote:<br>
> I'm trying to use tox from python2 to test a python3 environment. But I get<br>
> an exception like the following:<br>
><br>
> >rsyring@loftex:~/projects/blaze/blazeutils-src$ python -m virtualenv<br>
> >--python python3 ~/tmp/testvenv<br>
> >Running virtualenv with interpreter /home/rsyring/bin/python3<br>
> >Traceback (most recent call last):<br>
> > File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 14, in<br>
> ><module><br>
> > import shutil<br>
> > File "/opt/python34/lib/python3.4/shutil.py", line 11, in <module><br>
> > import fnmatch<br>
> > File "/opt/python34/lib/python3.4/fnmatch.py", line 15, in <module><br>
> > import functools<br>
> > File "/opt/python34/lib/python3.4/functools.py", line 21, in <module><br>
> > from collections import namedtuple<br>
> > File "/opt/python34/lib/python3.4/collections/__init__.py", line 17, in<br>
> ><module><br>
> > from reprlib import recursive_repr as _recursive_repr<br>
> > File "/usr/local/lib/python2.7/dist-packages/reprlib.py", line 3, in<br>
> ><module><br>
> > from repr import *<br>
> >ImportError: No module named 'repr'<br>
><br>
> There is a bug for this in virtualenv:<br>
><br>
> <a href="https://github.com/pypa/virtualenv/issues/625" rel="noreferrer" target="_blank">https://github.com/pypa/virtualenv/issues/625</a><br>
><br>
> So, I realize I could use `python3 -m virtualenv` if I was running the<br>
> command myself. But, tox is making the call to virtualenv.<br>
><br>
> This was working the last time I tested it but has now broken. I'm guessing<br>
> that is because I upgraded tox or virtualenv?<br>
<br>
</div></div>It broke now because you 'sudo pip install'ed something that depends on<br>
something that ships /usr/local/lib/python2.7/dist-packages/reprlib.py<br>
(which probably comes from pies2overrides)<br>
<span class=""><br>
> Any pointers welcome as to the best way to resolve this issue now?<br>
<br>
</span>I would recommend sudo pip uninstall pies2overrides (and whatever<br>
depended on it). A good way to avoid pain is to never ever 'sudo pip<br>
install' stuff.<br>
<br>
A different workaround would be to create a clean virtualenv, install<br>
tox into it, then run tox from that virtualenv.<br>
<span class="HOEnZb"><font color="#888888"><br>
Marius Gedminas<br>
--<br>
Un*x admins know what they are doing by definition.<br>
-- Bernd Petrovitsch<br>
</font></span><br>_______________________________________________<br>
Distutils-SIG maillist - <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/distutils-sig</a><br>
<br></blockquote></div><br></div>