Skip to content

Commit 28c98d4

Browse files
committed
Merge pull request #1404 from takotuesday/fix/python_path
fix(sphinx):adding check for PYTHONHOME
2 parents c537b05 + b513b3e commit 28c98d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

readthedocs/projects/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ def run(*commands, **kwargs):
6969
del environment['DJANGO_SETTINGS_MODULE']
7070
if 'PYTHONPATH' in environment:
7171
del environment['PYTHONPATH']
72+
# Remove PYTHONHOME env variable if set, otherwise pip install of requirements
73+
# into virtualenv will install incorrectly
74+
if 'PYTHONHOME' in environment:
75+
del environment['PYTHONHOME']
7276
cwd = os.getcwd()
7377
if not commands:
7478
raise ValueError("run() requires one or more command-line strings")

0 commit comments

Comments
 (0)