question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command 'black' not found while running 'black' without nbqa works fine

See original GitHub issue

When running nbqa black '<notebook_name>.ipynb' I get the following error:

Traceback (most recent call last): File “/home/mikey/.local/bin/nbqa”, line 8, in <module> sys.exit(main()) File “/home/mikey/.local/lib/python3.6/site-packages/nbqa/main.py”, line 502, in main for i in cli_args.root_dirs File “/home/mikey/.local/lib/python3.6/site-packages/nbqa/main.py”, line 502, in <listcomp> for i in cli_args.root_dirs File “/home/mikey/.local/lib/python3.6/site-packages/nbqa/main.py”, line 446, in _run_on_one_root_dir _get_arg(root_dir, tmpdirname, nb_to_py_mapping, project_root), File “/home/mikey/.local/lib/python3.6/site-packages/nbqa/main.py”, line 360, in _run_command f"Command {command} not found. " ValueError: Command black not found. Please make sure you have it installed before running nbqa on it.

While if I just run black <filename>.py it works fine.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
MarcoGorellicommented, Oct 16, 2020

@m3h0w if you upgrade to version 0.3.1, then I’d like to this this should work

1reaction
s-weigandcommented, Oct 16, 2020

IMHO the security concerns are more for applications like a webservices. If you have access to the shell already, there is no need to use shell injections.

And I have no example for a tool that would require this, just a suggestion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command "black" not found. Try 'pip install black'. #4 - GitHub
Is what I get when I try to Format Document. But I have a virtualenv selected, and Black is installed in that virtualenv...
Read more >
nbqa - PyPI
In your virtual environment, run (note: the $ is not part of the command): ... nbqa black my_notebook.ipynb reformatted my_notebook.ipynb All done!
Read more >
nbQA Documentation
Run the black formatter on your notebook via nbqa ... Although not recommended, it is still possible to temporarily disable all checks using ......
Read more >
Short Introduction to nbqa - Calmcode
In this short introduction we're doing to demonstrate how to use nbqa. ... code checking tools in python (like, black and flake8) only...
Read more >
Pip Command Not Found on Windows: A Guide | Built In
A “pip: command not found” error occurs when you haven't properly installed the package installer for Python (pip) on your computer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found