Email or username:

Password:

Forgot your password?
Top-level
Simon Willison

What if Python shipped a standard library module that diagnosed this stuff in as much detail as possible for you?

So you could run something like:

python -m debugenv

And it would print out a whole bunch of useful stuff about what your PATH is, your Python path, what version, any other versions it can find in common locations, if you are in a virtual environment, links to tutorials that will explain more - that kind of thing

7 comments
Ian

@simon I like the idea though I think "debug" shouldn't be the term used. I feel that should be reserved for actual code fixing, not just inspecting the environment.

Something like "inspect" or "list" or "show" or "dump" might be better?

Colin Dean

@simon something along these lines is quite literally on my plate for the next few weeks of free time at work

đŸ„„Matthew MartinđŸ„„â˜‘

@simon I started to write that once. The root problem is that the Python run time could be anywhere on the machine, but is likely at a few know places. Or it is at 130 places because that is how many vens are on the machine.

Thomas Vander Wal

@simon This would have saved me two to three hours today.

it really needs to come to life.

Min RK

@simon I’m sure you’ll hear about a number of these tools today, but for work I made a less Python-specific environment report tool, which handles things like HPC system modules, pip, conda, $PATH: github.com/minrk/envreport . It errs on the side of “entirely too much information, send this to support,” probably not very manageable for most directly affected individuals.

Go Up