google / importlab

A library that automatically infers dependencies for Python files
Apache License 2.0
169 stars 26 forks source link

Command-line tool needs extension? #51

Open treatmesubj opened 4 years ago

treatmesubj commented 4 years ago
pip install importlab

Expected to use the importlab command-line tool on Windows but:

'importlab' is not recognized as an internal or external command,
operable program or batch file.

I saw importlab was in fact sitting in C:\Users...\AppData\Local\Programs\Python\Python38-32\Scripts, but I guess it wouldn't do anything without an extension, so I just renamed it to runimportlab.py to avoid circular reference and works fine.

runimportlab.py --tree script.py 
rchen152 commented 4 years ago

I don't think we test on Windows, so no surprise importlab doesn't work. If you're using Windows 10, you might be able to get around this using WSL. The "Requirements" and "Installing" sections of the README for pytype (a project that uses importlab for which users have contributed some bare-bones WSL installation instructions) might be helpful: https://github.com/google/pytype#requirements.