[IPython-dev] test_pr for 3.x picking up 2.x paths

Min RK benjaminrk at gmail.com
Sun Jun 3 16:28:37 EDT 2012


Is it possible the venv hardcoded the PYTHONPATH into its site when it created the env?

-MinRK

On Jun 3, 2012, at 1:17 PM, Fernando Perez <fperez.net at gmail.com> wrote:

> On Sun, Jun 3, 2012 at 6:29 AM, Thomas Kluyver <takowl at gmail.com> wrote:
>> No flash of inspiration, sorry. I haven't seen that myself. If you
>> check /home/fperez/.ipy_pr_tests/venv-python3.2/bin/iptest3 , does it
>> have the correct shebang (should be pointing to a python executable in
>> the same folder)?
> 
> It does, and it's indeed a python3 binary. At least now I see the
> culprit.  If I wipe out PYTHONPATH and start that python, here's the
> sys.path it sees:
> 
>>>> pprint(sys.path)
> ['',
> '/home/fperez/.ipy_pr_tests/venv-python3.2/lib/python3.2/site-packages/distribute-0.6.24-py3.2.egg',
> '/home/fperez/.ipy_pr_tests/venv-python3.2/lib/python3.2/site-packages/pip-1.1-py3.2.egg',
> '/home/fperez/.ipy_pr_tests/venv-python3.2/lib/python3.2/site-packages/ipython-0.13.dev-py3.2.egg',
> '/usr/lib/pymodules/python2.7',
> '/home/fperez/.ipy_pr_tests/venv-python3.2/bin',
> '/home/fperez/.ipy_pr_tests/venv-python3.2/lib/python3.2',
> '/home/fperez/.ipy_pr_tests/venv-python3.2/lib/python3.2/plat-linux2',
> '/home/fperez/.ipy_pr_tests/venv-python3.2/lib/python3.2/lib-dynload',
> '/usr/lib/python3.2',
> '/usr/lib/python3.2/plat-linux2',
> '/home/fperez/.ipy_pr_tests/venv-python3.2/lib/python3.2/site-packages',
> '/home/fperez/.local/lib/python3.2/site-packages',
> '/usr/lib/python3/dist-packages',
> '/usr/local/lib/python3.2/dist-packages']
> 
> That '/usr/lib/pymodules/python2.7' in the middle is what's messing
> things up.  I wonder what in this Ubuntu box is setting that
> variable...  It's not anything in my personal environment, b/c that's
> all just PYTHONPATH.  It's as if a system-wide config file is getting
> picked up somewhere...
> 
> Frustrating.
> 
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



More information about the IPython-dev mailing list