How can I set log level used by distutils when using pip?
Asked Answered
F

2

5

I'm trying to find out what's the reason of error: Unable to find vcvarsall.bat after pip install greenlet. I'd like to set log level used by distutils so that debug messages like log.debug("Unable to find productdir in registry") would get printed. After looking at def parse_command_line(self): I thought pip install --install-option="-vv" greenlet should work but it doesn't (verbosity is still 1).

How can I do this?

Fragmental answered 2/1, 2012 at 13:46 Comment(2)
It might happen that pip itself is changing the log level. Have you tried pip -vv install --install-option="-vv" greenlet?Distortion
Yes, that's what I started with. It doesn't work.Fragmental
A
6

The correct way is to use the --global-option="-vv" switch for pip install, which passes the option in between setup.py and install when invoking setup.py

Anon answered 3/1, 2012 at 10:20 Comment(0)
E
0

Try to set DISTUTILS_DEBUG in the environment.

Elastin answered 3/1, 2012 at 15:30 Comment(4)
This environment variable is used only locally in cmd.py and in filelist.py modules and does not effect debug level used by Log class in log.py module.Fragmental
Ah, I had forgotten that debug and log were separate things in distutils. Glad we ripped all that off in favor of simple logging in distutils2.Elastin
You mean distutils2 doesn't use Python standard logging module?Fragmental
I mean it simply uses the standard logging module :)Elastin

© 2022 - 2024 — McMap. All rights reserved.