5 votes

Topic deleted by author

6 comments

  1. [3]
    tesseractcat
    Link
    Pip is a package manager for python modules that ships with python. Depending on how you installed it, you can execute it via pip, pip3, python3 -m pip, or python -m pip. Most likely it will...

    Pip is a package manager for python modules that ships with python. Depending on how you installed it, you can execute it via pip, pip3, python3 -m pip, or python -m pip. Most likely it will simply be pip. You would run this from the terminal, since pip is a command line program.

    10 votes
    1. [3]
      Comment deleted by author
      Link Parent
      1. [2]
        teaearlgraycold
        Link Parent
        If you can't find a pip3 binary anywhere on your system you could, worst case, add this to your ~/.bashrc: alias pip="python3 -m pip" Look for a pip copy with this command: find / -name pip* 2>...

        If you can't find a pip3 binary anywhere on your system you could, worst case, add this to your ~/.bashrc:

        alias pip="python3 -m pip"
        

        Look for a pip copy with this command:

        find / -name pip* 2> /dev/null
        
        5 votes
        1. unknown user
          Link Parent
          He's on a Mac, so more correctly he'd want this in ~/.bash_profile, so a symlink or a source from ~/.bashrc are both acceptable alternatives.

          He's on a Mac, so more correctly he'd want this in ~/.bash_profile, so a symlink or a source from ~/.bashrc are both acceptable alternatives.

          1 vote
  2. [2]
    Comment deleted by author
    Link
    1. gco
      Link Parent
      Not sure if it's possible in other editors, but I've set up Atom so every time I save it runs black on the file.

      the black tool must (as far as I'm aware) also be run from a terminal

      Not sure if it's possible in other editors, but I've set up Atom so every time I save it runs black on the file.

      1 vote
  3. PetitPrince
    Link
    In addition to the other answer, notice that some editor can directly integrate Black (or other code formatter such as yapf, autopep8, etc) within their interface. For instance, if you are using...

    In addition to the other answer, notice that some editor can directly integrate Black (or other code formatter such as yapf, autopep8, etc) within their interface.

    For instance, if you are using VS Code and have installed the python extension and set Black as the code formatter, you can then use the format option and have the text directly replaced in the editor.

    4 votes
  4. Soptik
    Link
    Yes. Pip is a program, just like python, or firefox. Just as every other program, you can start it from the terminal (actually, you can start many programs just from the terminal). Running pip...

    Yes.

    Pip is a program, just like python, or firefox. Just as every other program, you can start it from the terminal (actually, you can start many programs just from the terminal).

    Running pip install black in terminal should be enough.

    2 votes