https://bugs.winehq.org/show_bug.cgi?id=46108
Bug ID: 46108 Summary: Wine creates env var with empty string for name and it breaks python-pip Product: Wine Version: 3.17 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: stu.axon@gmail.com Distribution: ---
When I try and install things using pip (from python 2.7, since python 3.5 install doesn't work right not).
it fails, with
*** ValueError: illegal environment variable name
If I open the python interpreter I can see there is an env var with the name of an empty string:
import os os.environ['']
'Z:=Z:\home\stu\Downloads'
I had a look at this outside of wine and the env var doesn't show up when running the same python.
I edited pythons pip code to remove the env var: ~/.wine/drive_c/Python27/Lib/site-packages/pip/_internal/utils/misc.py
I changed these lines:
env = os.environ.copy() if extra_environ: env.update(extra_environ)
To:
env = os.environ.copy() if extra_environ: env.update(extra_environ) env.pop('')
And then pip succeeds