Fix potential environment variable setting issue in pypi.py