Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83438
| Date | 2015-01-09 13:14 +0000 |
|---|---|
| From | Gisle Vanem <gvanem@yahoo.no> |
| Subject | Non-unique dirs in sys.path |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17525.1420809259.18130.python-list@python.org> (permalink) |
I'm having some trouble understanding why my Python 2.7.9
has the '%PYTHONHOME%\lib\site-packages' listed multiple
times.
I cooked up this .bat file to demonstrate the issue:
@echo off
setlocal
set PYTHONPATH=
python -c "import sys; [sys.stdout.write('%%s\n' %% p) for (i,p) in enumerate(sys.path)]" | sort --ignore-case
which produces:
f:\Documents and Settings\Gisle Vanem\Programdata\Python\Python27\site-packages
f:\windows\system32\python27.zip << !! doesn't exist, but okay.
G:\Programfiler\Python27
g:\Programfiler\Python27\DLLs
g:\Programfiler\Python27\lib
g:\Programfiler\Python27\lib\lib-tk
g:\Programfiler\Python27\lib\plat-win
g:\Programfiler\Python27\lib\site-packages << !!
g:\programfiler\python27\lib\site-packages << !!
...
Why are these listed twice with different casing? One
would assume that Python on Win32 would be case-insensitive.
Some .pth-file to blame here?
I've checked that PYTHONPATH is not defined elsewhere. Like in:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
or
HKCU\Environment
--
--gv
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Non-unique dirs in sys.path Gisle Vanem <gvanem@yahoo.no> - 2015-01-09 13:14 +0000
csiph-web