<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">You could try using the virtualenv rewrite (my branch) - it&#39;s well tested, albeit unreviewed. AFAIK it doesn&#39;t have the issue you&#39;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">&lt;<a href="mailto:marius@gedmin.as" target="_blank">marius@gedmin.as</a>&gt;</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>
&gt; I&#39;m trying to use tox from python2 to test a python3 environment. But I get<br>
&gt; an exception like the following:<br>
&gt;<br>
&gt; &gt;rsyring@loftex:~/projects/blaze/blazeutils-src$ python -m virtualenv<br>
&gt; &gt;--python python3 ~/tmp/testvenv<br>
&gt; &gt;Running virtualenv with interpreter /home/rsyring/bin/python3<br>
&gt; &gt;Traceback (most recent call last):<br>
&gt; &gt;  File &quot;/usr/local/lib/python2.7/dist-packages/virtualenv.py&quot;, line 14, in<br>
&gt; &gt;&lt;module&gt;<br>
&gt; &gt;    import shutil<br>
&gt; &gt;  File &quot;/opt/python34/lib/python3.4/shutil.py&quot;, line 11, in &lt;module&gt;<br>
&gt; &gt;    import fnmatch<br>
&gt; &gt;  File &quot;/opt/python34/lib/python3.4/fnmatch.py&quot;, line 15, in &lt;module&gt;<br>
&gt; &gt;    import functools<br>
&gt; &gt;  File &quot;/opt/python34/lib/python3.4/functools.py&quot;, line 21, in &lt;module&gt;<br>
&gt; &gt;    from collections import namedtuple<br>
&gt; &gt;  File &quot;/opt/python34/lib/python3.4/collections/__init__.py&quot;, line 17, in<br>
&gt; &gt;&lt;module&gt;<br>
&gt; &gt;    from reprlib import recursive_repr as _recursive_repr<br>
&gt; &gt;  File &quot;/usr/local/lib/python2.7/dist-packages/reprlib.py&quot;, line 3, in<br>
&gt; &gt;&lt;module&gt;<br>
&gt; &gt;    from repr import *<br>
&gt; &gt;ImportError: No module named &#39;repr&#39;<br>
&gt;<br>
&gt; There is a bug for this in virtualenv:<br>
&gt;<br>
&gt;     <a href="https://github.com/pypa/virtualenv/issues/625" rel="noreferrer" target="_blank">https://github.com/pypa/virtualenv/issues/625</a><br>
&gt;<br>
&gt; So, I realize I could use `python3 -m virtualenv` if I was running the<br>
&gt; command myself.  But, tox is making the call to virtualenv.<br>
&gt;<br>
&gt; This was working the last time I tested it but has now broken.  I&#39;m guessing<br>
&gt; that is because I upgraded tox or virtualenv?<br>
<br>
</div></div>It broke now because you &#39;sudo pip install&#39;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>
&gt; 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 &#39;sudo pip<br>
install&#39; 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>