Skip to content

don't pick up python2 from PYTHONPATH during selenium install#3047

Merged
sougou merged 2 commits intovitessio:masterfrom
slanning:patch-1
Sep 4, 2017
Merged

don't pick up python2 from PYTHONPATH during selenium install#3047
sougou merged 2 commits intovitessio:masterfrom
slanning:patch-1

Conversation

@slanning
Copy link
Copy Markdown
Contributor

$ ./bootstrap.sh
...
Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/home/whatever/go/dist/selenium/bin/pip", line 7, in
from pip import main
File "/home/whatever/go/dist/grpc/usr/local/lib/python2.7/site-packages/pip/init.py", line 21, in
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
ImportError: No module named 'pip._vendor.requests'

Turned out to be because PYTHONPATH had go/dist/grpc/usr/local/lib/python2.7/site-packages before go/dist/selenium/lib/python3.5/site-packages (3.5 has the missing module).

Setting PYTHONPATH= for that pip install worked for me.
Slightly worried because Alex Charis made some commits about this in February ( f14c058 , 3a5949b ), so maybe I'm just undoing that.

$ ./bootstrap.sh
...
Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/home/whatever/go/dist/selenium/bin/pip", line 7, in <module>
    from pip import main
  File "/home/whatever/go/dist/grpc/usr/local/lib/python2.7/site-packages/pip/__init__.py", line 21, in <module>
    from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
ImportError: No module named 'pip._vendor.requests'

Turned out to be because PYTHONPATH had go/dist/grpc/usr/local/lib/python2.7/site-packages before go/dist/selenium/lib/python3.5/site-packages (3.5 has the missing module).

Setting PYTHONPATH= for that pip install worked for me.
Slightly worried because Alex Charis made some commits about this in February ( f14c058 , 3a5949b ), so maybe I'm just undoing that.
@sougou
Copy link
Copy Markdown
Contributor

sougou commented Aug 11, 2017

@acharis can you take a look?

@sougou
Copy link
Copy Markdown
Contributor

sougou commented Aug 18, 2017

@acharis ping

@sougou
Copy link
Copy Markdown
Contributor

sougou commented Sep 3, 2017

@slanning can you add a comment before the line on why we're removing the PYTHONPATH? Essentially what you said on the PR.
This workaround is good enough for now. We could try to change things such that the selenium's PYTHONPATH comes before grpc, but that could very well break other things.

@sougou
Copy link
Copy Markdown
Contributor

sougou commented Sep 4, 2017

LGTM

Approved with PullApprove

@sougou sougou merged commit e4dd36b into vitessio:master Sep 4, 2017
@slanning slanning deleted the patch-1 branch September 4, 2017 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants