gclient sync failing on windows, vpython, urllib3, VirtualEnv

1,539 views
Skip to first unread message

crou...@chromium.org

unread,
Dec 20, 2017, 7:28:50 PM12/20/17
to Chromium-dev
Hi, I'm trying to run gclient sync on a chromium checkout on Windows that I haven't touched in a couple weeks. I hit the following error. Any ideas? Thanks!

Processing urllib3-dev-py2.7.egg
creating c:\users\crouleau\depot_tools\win_tools-2_7_6_bin\python\bin\lib\site-packages\urllib3-dev-py2.7.egg
Extracting urllib3-dev-py2.7.egg to c:\users\crouleau\depot_tools\win_tools-2_7_6_bin\python\bin\lib\site-packages
Adding urllib3 dev to easy-install.pth file

Installed c:\users\crouleau\depot_tools\win_tools-2_7_6_bin\python\bin\lib\site-packages\urllib3-dev-py2.7.egg
Processing dependencies for urllib3==dev
Finished processing dependencies for urllib3==dev
C:\Users\crouleau\urllib\urllib3>C:\Users\crouleau\depot_tools\vpython.bat setup.py install
[E2017-12-20T16:17:01.466434-08:00 9060 0 venv.go:826] Process output:
New python executable in C:\Users\crouleau\.vpython-root\175ce0\Scripts\python.exe
Installing setuptools, pip, wheel...
  Complete output from command C:\Users\crouleau\.v...0\Scripts\python.exe - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
  File "C:\c\Users\crouleau\chromium\src\USERPR~1\AppData\Local\Temp\vpython_bootstrap211766330\packages\virtualenv-15.1.0\virtualenv_support\pip-9.0.1-py2.py3-none-any.whl\pip\__init__.py", line 21, in <module>
  File "C:\c\Users\crouleau\chromium\src\USERPR~1\AppData\Local\Temp\vpython_bootstrap211766330\packages\virtualenv-15.1.0\virtualenv_support\pip-9.0.1-py2.py3-none-any.whl\pip\_vendor\requests\__init__.py", line 62, in <module>
  File "C:\c\Users\crouleau\chromium\src\USERPR~1\AppData\Local\Temp\vpython_bootstrap211766330\packages\virtualenv-15.1.0\virtualenv_support\pip-9.0.1-py2.py3-none-any.whl\pip\_vendor\requests\packages\__init__.py", line 29, in <module>
ImportError: No module named urllib3
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "virtualenv.py", line 2328, in <module>
    main()
  File "virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "virtualenv.py", line 945, in create_environment
    download=download,
  File "virtualenv.py", line 901, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "virtualenv.py", line 797, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command C:\Users\crouleau\.v...0\Scripts\python.exe - setuptools pip wheel failed with error code 1

Robbie Iannucci

unread,
Dec 20, 2017, 7:56:16 PM12/20/17
to Chromium-dev
Can you indicate exactly what command you were trying to run? I'm not sure what would be creating urllib3 eggs or running setup.py with vpython.bat. Can you ensure that your depot_tools is up to date as well?

I'm going to go crawl around the codesearch a bit.

Thanks,
Robbie

crou...@chromium.org

unread,
Dec 20, 2017, 8:03:39 PM12/20/17
to Chromium-dev
Thanks for the response!

I was running "gclient sync":

C:\Users\crouleau\src\src>gclient sync

It's possible I was doing something hacky a few weeks ago. I saw the following in depot_tools:,

C:\Users\crouleau\src\depot_tools>git diff vpython.bat
diff --git a/vpython.bat b/vpython.bat
index 8aaf9297..e69de29b 100644
--- a/vpython.bat
+++ b/vpython.bat
@@ -1,7 +0,0 @@
-@echo off
-:: Copyright 2017 The Chromium Authors. All rights reserved.
-:: Use of this source code is governed by a BSD-style license that can be
-:: found in the LICENSE file.
-
-call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
-"%~dp0\.cipd_bin\vpython.exe" %*

I "git checkout vpython.bat" and things still don't work. I made sure depot_tools is up to date:

C:\Users\crouleau\src\depot_tools>git status
HEAD detached from b7c80888
nothing to commit, working tree clean

C:\Users\crouleau\src\depot_tools>git pull
Already up to date.

I'm thinking about just pulling in a fresh depot_tools and starting from scratch.

crou...@chromium.org

unread,
Dec 20, 2017, 8:04:45 PM12/20/17
to Chromium-dev
Here's the full command: 

C:\Users\crouleau\src\src>gclient sync
Syncing projects: 100% (133/133), done.

________ running 'vpython.bat src/build/landmines.py' in 'C:\Users\crouleau\src'
[E2017-12-20T17:00:48.023222-08:00 11000 0 venv.go:870] Process output:
New python executable in C:\Users\crouleau\.vpython-root\35571e\Scripts\python.exe
Installing setuptools, pip, wheel...
  Complete output from command C:\Users\crouleau\.v...e\Scripts\python.exe - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
  File "C:\c\Users\crouleau\chromium\src\USERPR~1\AppData\Local\Temp\vpython_bootstrap034083334\packages\virtualenv-15.1.0\virtualenv_support\pip-9.0.1-py2.py3-none-any.whl\pip\__init__.py", line 21, in <module>
  File "C:\c\Users\crouleau\chromium\src\USERPR~1\AppData\Local\Temp\vpython_bootstrap034083334\packages\virtualenv-15.1.0\virtualenv_support\pip-9.0.1-py2.py3-none-any.whl\pip\_vendor\requests\__init__.py", line 62, in <module>
  File "C:\c\Users\crouleau\chromium\src\USERPR~1\AppData\Local\Temp\vpython_bootstrap034083334\packages\virtualenv-15.1.0\virtualenv_support\pip-9.0.1-py2.py3-none-any.whl\pip\_vendor\requests\packages\__init__.py", line 29, in <module>
ImportError: No module named urllib3
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "virtualenv.py", line 2328, in <module>
    main()
  File "virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "virtualenv.py", line 945, in create_environment
    download=download,
  File "virtualenv.py", line 901, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "virtualenv.py", line 797, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command C:\Users\crouleau\.v...e\Scripts\python.exe - setuptools pip wheel failed with error code 1
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] original error: exit status 1
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] goroutine 1:
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #0 go.chromium.org/luci/vpython/venv/venv.go:574 - venv.(*Env).installVirtualEnv()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]   reason: failed to create VirtualEnv
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #1 go.chromium.org/luci/vpython/venv/venv.go:490 - venv.(*Env).createLocked.func1()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]   reason: failed to install VirtualEnv
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #2 go.chromium.org/luci/common/system/filesystem/tempdir.go:55 - filesystem.(*TempDir).With()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #3 go.chromium.org/luci/vpython/venv/venv.go:72 - venv.withTempDir()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #4 go.chromium.org/luci/vpython/venv/venv.go:466 - venv.(*Env).createLocked()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #5 go.chromium.org/luci/vpython/venv/venv.go:241 - venv.(*Env).ensure.func1()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]   reason: failed to create new VirtualEnv
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #6 go.chromium.org/luci/vpython/venv/venv.go:885 - venv.mustReleaseLock()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #7 go.chromium.org/luci/vpython/venv/venv.go:227 - venv.(*Env).ensure()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #8 go.chromium.org/luci/vpython/venv/venv.go:123 - venv.With()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]   reason: failed to create empty probe environment
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242]
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #9 go.chromium.org/luci/vpython/run.go:63 - vpython.Run()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #10 go.chromium.org/luci/vpython/application/application.go:266 - application.(*application).mainImpl()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #11 go.chromium.org/luci/vpython/application/application.go:354 - application.(*Config).Main.func1()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #12 go.chromium.org/luci/vpython/application/support.go:45 - application.run()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #13 go.chromium.org/luci/vpython/application/application.go:353 - application.(*Config).Main()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #14 vpython/main.go:92 - main.mainImpl()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #15 vpython/main.go:98 - main.main()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #16 runtime/proc.go:185 - runtime.main()
[E2017-12-20T17:00:48.132800-08:00 11000 0 annotate.go:242] #17 runtime/asm_amd64.s:2337 - runtime.goexit()
Error: Command 'vpython.bat src/build/landmines.py' returned non-zero exit status 1 in C:\Users\crouleau\src

Robbie Iannucci

unread,
Dec 20, 2017, 8:07:44 PM12/20/17
to Chromium-dev
And you can confirm that depot_tools is at the front of your %PATH%? Or are there other python interpreters on your %PATH%?


On Wednesday, December 20, 2017 at 4:28:50 PM UTC-8, crou...@chromium.org wrote:

crou...@chromium.org

unread,
Dec 20, 2017, 8:09:59 PM12/20/17
to Chromium-dev
Yes:

C:\Users\crouleau\src>where python
C:\Users\crouleau\src\depot_tools\python.bat
C:\python_27_amd64\files\python.exe

C:\Users\crouleau\src>echo %Path%
C:\Users\crouleau\src\depot_tools;C:\Windows\CCM\;C:\Windows\system32;.....

Robbie Iannucci

unread,
Dec 20, 2017, 8:12:32 PM12/20/17
to Chromium-dev
Hm, ok.

Would you mind trying an experiment and removing `C:\python_27_amd64\files` from path? I'm wondering if virtualenv is getting confused by it (if so I'll need to fix vpython to ignore it).

Robbie

Robbie Iannucci

unread,
Dec 20, 2017, 8:13:01 PM12/20/17
to Chromium-dev
Oh! Also, what does your %PYTHONPATH% look like (if anything?)

crou...@chromium.org

unread,
Dec 20, 2017, 8:14:50 PM12/20/17
to Chromium-dev
Sure I'll try the experiment.

PYTHONPATH isn't set:

C:\Users\crouleau\src>echo %PYTHONPATH%
%PYTHONPATH%

crou...@chromium.org

unread,
Dec 20, 2017, 8:23:36 PM12/20/17
to Chromium-dev
Okay, I removed C:\python_27_amd64\files from my Path. It took a bit since it was both in my User Variables and my System Variables. Kinda wondering if I have some other stuff in there that could be messing this up.

C:\Users\crouleau>where python
C:\Users\crouleau\src\depot_tools\python.bat

and gclient sync still failed :(

Robbie Iannucci

unread,
Dec 20, 2017, 8:27:58 PM12/20/17
to Chromium-dev
merrrr :( Sometimes those variables require a restart, not sure if that helps.

I'm cloning a copy of src on my windows box to see if I can repro.

If anyone else has a windows checkout and is reading this, could they confirm if this is failing/working for them too?

R

Robbie Iannucci

unread,
Dec 20, 2017, 8:31:57 PM12/20/17
to Chromium-dev
Oh, another thing to try, can you run `vpython` by itself in cmd? You should get a python prompt.

crou...@chromium.org

unread,
Dec 20, 2017, 9:18:11 PM12/20/17
to Chromium-dev
Alright, so I removed a bunch of environment variables (now I don't remember what they were exactly) and removed the following from my path:

C:\bagpipe
C:\python_27_amd64\files
 C:\Users\crouleau\AppData\Local\Programs\Git\cmd
 %USERPROFILE%\AppData\Local\Microsoft\WindowsApps

And then it started working again. Now I can't get it to fail, and I'm headed home for the day.

Thanks for the help!

Ken Russell

unread,
Dec 20, 2017, 9:41:55 PM12/20/17
to Caleb Rouleau, Chromium-dev
Confirming that gclient sync works on my Windows workstation. gclient auto-updated, and confirming that vpython works too.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/bc1bd2a3-a71d-433d-95b1-f5870a1f3197%40chromium.org.

Reply all
Reply to author
Forward
0 new messages